diff --git a/uk_bin_collection/tests/test_common_functions.py b/uk_bin_collection/tests/test_common_functions.py index f08961ff58..b73bae4209 100644 --- a/uk_bin_collection/tests/test_common_functions.py +++ b/uk_bin_collection/tests/test_common_functions.py @@ -98,7 +98,7 @@ def test_is_holiday(): def test_is_holiday_region(): date = "20" - result = is_holiday("2022, 12, 25", Region.Wales) + result = is_holiday("2022, 12, 25", Region.WLS) assert result is True diff --git a/uk_bin_collection/uk_bin_collection/common.py b/uk_bin_collection/uk_bin_collection/common.py index e8de827579..7143d0446c 100644 --- a/uk_bin_collection/uk_bin_collection/common.py +++ b/uk_bin_collection/uk_bin_collection/common.py @@ -25,10 +25,10 @@ class Region(Enum): UK = 1 - England = 2 - Northern_Ireland = 3 - Scotland = 4 - Wales = 5 + ENG = 2 + NIR = 3 + SCT = 4 + WLS = 5 def check_postcode(postcode: str): diff --git a/uk_bin_collection/uk_bin_collection/councils/NorthTynesideCouncil.py b/uk_bin_collection/uk_bin_collection/councils/NorthTynesideCouncil.py index 02987b3f7d..b58c7794b9 100644 --- a/uk_bin_collection/uk_bin_collection/councils/NorthTynesideCouncil.py +++ b/uk_bin_collection/uk_bin_collection/councils/NorthTynesideCouncil.py @@ -181,7 +181,7 @@ def parse_data(self, page: str, **kwargs) -> dict: for item in regular_collections: item_as_date = datetime.strptime(item, date_format) # Check if holiday (calendar only has one day that's a holiday, and it's moved to the next day) - if is_holiday(item_as_date, Region.England): + if is_holiday(item_as_date, Region.ENG): item_as_date += timedelta(days=1) # Use the isoweek number to separate collections - at the time of writing 11th Jan is week 2, which # is for the grey bin