diff --git a/src/meteofrance_api/helpers.py b/src/meteofrance_api/helpers.py index 4b80b8a4..ed078640 100644 --- a/src/meteofrance_api/helpers.py +++ b/src/meteofrance_api/helpers.py @@ -84,7 +84,7 @@ def is_valid_warning_department(department_number: str) -> bool: return department_number in VALID_DEPARTMENT_LIST -def readeable_phenomenons_dict( +def readable_phenomenons_dict( list_phenomenons: List[PhenomenonMaxColor], language: str = "fr" ) -> Dict[Optional[str], Optional[str]]: """Create a dictionary with human readable keys and values (Helper). diff --git a/tests/test_helpers.py b/tests/test_helpers.py index a243845c..6baddba4 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -8,7 +8,7 @@ from meteofrance_api.helpers import get_warning_text_status_from_indice_color from meteofrance_api.helpers import is_coastal_department from meteofrance_api.helpers import is_valid_warning_department -from meteofrance_api.helpers import readeable_phenomenons_dict +from meteofrance_api.helpers import readable_phenomenons_dict from meteofrance_api.helpers import sort_places_versus_distance_from_coordinates from meteofrance_api.model import Place from meteofrance_api.model.place import PlaceData @@ -58,7 +58,7 @@ def test_is_valid_warning_department(dep: str, res: bool) -> None: assert is_valid_warning_department(dep) == res -def test_readeable_phenomenons_dict() -> None: +def test_readable_phenomenons_dict() -> None: """Test the helper constructing a human readable dictionary for phenomenon.""" api_list = [ PhenomenonMaxColor(phenomenon_id="4", phenomenon_max_color_id=1), @@ -76,7 +76,7 @@ def test_readeable_phenomenons_dict() -> None: "Vent violent": "Orange", } - assert readeable_phenomenons_dict(api_list) == expected_dictionary + assert readable_phenomenons_dict(api_list) == expected_dictionary def test_sort_places_versus_distance_from_coordinates() -> None: diff --git a/tests/test_integrations.py b/tests/test_integrations.py index 91632227..0895ef75 100644 --- a/tests/test_integrations.py +++ b/tests/test_integrations.py @@ -3,7 +3,7 @@ import pytest from meteofrance_api import MeteoFranceClient -from meteofrance_api.helpers import readeable_phenomenons_dict +from meteofrance_api.helpers import readable_phenomenons_dict @pytest.mark.parametrize("city", ["Montréal", "Foix"]) @@ -38,7 +38,7 @@ def test_workflow(city: str) -> None: my_place_weather_alerts = client.get_warning_current_phenomenons( my_place.admin2 ) - readable_warnings = readeable_phenomenons_dict( + readable_warnings = readable_phenomenons_dict( my_place_weather_alerts.phenomenons_max_colors )