中国城市电报推送接入 AMSC AWOS 跑道报文温度

Constraint: 仅当 amos 数据含 raw_metar 时才追加 AMSC 块,不影响非中国城市
This commit is contained in:
2569718930@qq.com
2026-05-22 03:14:21 +08:00
parent fe6f8b43b0
commit 5176dff82d
2 changed files with 21 additions and 31 deletions
-30
View File
@@ -1,30 +0,0 @@
from scripts.grant_subscription_by_email import _select_exact_user_id
from src.payments.contract_checkout import PaymentCheckoutError
def test_select_exact_user_id_prefers_exact_email_match():
payload = {
"users": [
{"id": "wrong-user", "email": "louischanre+alias@gmail.com"},
{"id": "right-user", "email": "louischanre@gmail.com"},
]
}
result = _select_exact_user_id(payload, "louischanre@gmail.com")
assert result == "right-user"
def test_select_exact_user_id_raises_when_exact_email_missing():
payload = {
"users": [
{"id": "wrong-user", "email": "louischanre+alias@gmail.com"},
]
}
try:
_select_exact_user_id(payload, "louischanre@gmail.com")
except PaymentCheckoutError as exc:
assert exc.status_code == 404
else:
raise AssertionError("expected PaymentCheckoutError")