def test_full_with_coastal_bulletint(dep: str, res: bool) -> None: """Test getting a complete advanced bulletin for coastal department.""" client = MeteoFranceClient() full_phenomenoms = client.get_warning_full(domain=dep, with_costal_bulletin=True) has_coastal_phenomenom = any( phenomenom["phenomenon_id"] == 9 for phenomenom in full_phenomenoms.phenomenons_items) assert has_coastal_phenomenom == res
def test_fulls() -> None: """Test advanced weather alert results from API.""" client = MeteoFranceClient() warning_full = client.get_warning_full(domain="31") assert type(warning_full.update_time) == int assert type(warning_full.end_validity_time) == int assert type(warning_full.domain_id) == str assert warning_full.domain_id == "31" assert warning_full.color_max in WARNING_COLOR_LIST assert (warning_full.timelaps[0]["timelaps_items"][0]["color_id"] in WARNING_COLOR_LIST) assert (warning_full.phenomenons_items[0]["phenomenon_max_color_id"] in WARNING_COLOR_LIST)