修复 lau fau shan → shenzhen 重命名导致的 3 个测试失败
This commit is contained in:
@@ -292,13 +292,13 @@ def test_hko_provider_marks_explicit_official_station_as_anchor():
|
|||||||
raw = {
|
raw = {
|
||||||
"settlement_current": {
|
"settlement_current": {
|
||||||
"station_code": "LFS",
|
"station_code": "LFS",
|
||||||
"station_name": "Lau Fau Shan",
|
"station_name": "shenzhen",
|
||||||
"observation_time": "2026-04-06T10:00:00+08:00",
|
"observation_time": "2026-04-06T10:00:00+08:00",
|
||||||
"current": {"temp": 25.0},
|
"current": {"temp": 25.0},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
snapshot = build_country_network_snapshot("lau fau shan", raw)
|
snapshot = build_country_network_snapshot("shenzhen", raw)
|
||||||
|
|
||||||
assert snapshot["provider_code"] == "hongkong_hko"
|
assert snapshot["provider_code"] == "hongkong_hko"
|
||||||
assert snapshot["settlement_station"]["is_official_station_anchor"] is True
|
assert snapshot["settlement_station"]["is_official_station_anchor"] is True
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ def test_lau_fau_shan_uses_shenzhen_market_city():
|
|||||||
layer._build_top_temperature_buckets = _fake_build_top_temperature_buckets
|
layer._build_top_temperature_buckets = _fake_build_top_temperature_buckets
|
||||||
|
|
||||||
scan = layer.build_market_scan(
|
scan = layer.build_market_scan(
|
||||||
city="Lau Fau Shan",
|
city="shenzhen",
|
||||||
target_date="2026-04-23",
|
target_date="2026-04-23",
|
||||||
temperature_bucket={"temp": 30, "probability": 0.58},
|
temperature_bucket={"temp": 30, "probability": 0.58},
|
||||||
model_probability=0.58,
|
model_probability=0.58,
|
||||||
@@ -289,7 +289,7 @@ def test_lau_fau_shan_uses_shenzhen_market_city():
|
|||||||
|
|
||||||
assert captured["primary_city_key"] == "shenzhen"
|
assert captured["primary_city_key"] == "shenzhen"
|
||||||
assert captured["bucket_city_key"] == "shenzhen"
|
assert captured["bucket_city_key"] == "shenzhen"
|
||||||
assert scan["city_key"] == "lau fau shan"
|
assert scan["city_key"] == "shenzhen"
|
||||||
assert scan["market_city_key"] == "shenzhen"
|
assert scan["market_city_key"] == "shenzhen"
|
||||||
assert scan["selected_slug"] == "highest-temperature-in-shenzhen-on-april-23-2026-30c-or-higher"
|
assert scan["selected_slug"] == "highest-temperature-in-shenzhen-on-april-23-2026-30c-or-higher"
|
||||||
|
|
||||||
|
|||||||
@@ -70,9 +70,11 @@ def test_singapore_is_in_telegram_push_city_lists():
|
|||||||
assert HIGH_FREQ_AIRPORT_ICAO["singapore"] == "WSSS"
|
assert HIGH_FREQ_AIRPORT_ICAO["singapore"] == "WSSS"
|
||||||
|
|
||||||
|
|
||||||
def test_shenzhen_is_removed_from_telegram_push_city_lists():
|
def test_shenzhen_is_in_high_freq_push_as_hko_station():
|
||||||
assert "shenzhen" not in HIGH_FREQ_AIRPORT_CITIES
|
# shenzhen uses LFS / HKO 1-min data (formerly lau fau shan)
|
||||||
assert "shenzhen" not in HIGH_FREQ_AIRPORT_ICAO
|
assert "shenzhen" in HIGH_FREQ_AIRPORT_CITIES
|
||||||
|
assert "shenzhen" in HIGH_FREQ_AIRPORT_ICAO
|
||||||
|
assert HIGH_FREQ_AIRPORT_ICAO["shenzhen"] == "LFS"
|
||||||
|
|
||||||
|
|
||||||
def test_high_freq_airport_push_forces_analysis_refresh(monkeypatch):
|
def test_high_freq_airport_push_forces_analysis_refresh(monkeypatch):
|
||||||
|
|||||||
Reference in New Issue
Block a user