diff --git a/hub/tests/test_import_areas.py b/hub/tests/test_import_areas.py index 7fbcd415..9f3b88c9 100644 --- a/hub/tests/test_import_areas.py +++ b/hub/tests/test_import_areas.py @@ -8,7 +8,7 @@ def mock_areas_of_type(types, generation=None): - if "WMC" in types: + if "WMC" in types and generation is None: return [ { "id": 1, @@ -43,6 +43,14 @@ def test_import(self, mapit_geom, mapit_areas): call_command("import_areas", quiet=self.quiet_parameter) + expected_calls = [ + mock.call(["WMC"], generation=54), # pre-2024 constituencies + mock.call(["WMC"], generation=None), # 2025 constituencies + mock.call(["LBO", "UTA", "COI", "LGD", "CTY", "MTD"], generation=None), # Single Tier councils + mock.call(["DIS", "NMD"], generation=None), # District councils + ] + self.assertEqual(mapit_areas.call_args_list, expected_calls) + areas = Area.objects.all() self.assertEqual(areas.count(), 2)