diff --git a/epc_data/tests/test_roof_attributes.py b/epc_data/tests/test_roof_attributes.py index 94e0ce82..8d0a1e3e 100644 --- a/epc_data/tests/test_roof_attributes.py +++ b/epc_data/tests/test_roof_attributes.py @@ -52,13 +52,17 @@ class TestRoofAttributes: assert result == expected_output - for test_case in clean_roof_test_cases: - result = RoofAttributes(test_case['original_description']).process() - # Ensure the output ordering is correct - expected_result = {key: test_case[key] for key in result.keys()} - expected_result["desc"] = test_case["original_description"] - result["desc"] = test_case["original_description"] - assert result == expected_result + @pytest.mark.parametrize( + "test_case", + clean_roof_test_cases + ) + def test_process(self, test_case): + expected_result = test_case.copy() + del expected_result["original_description"] + result = RoofAttributes(test_case['original_description']).process() + # Ensure the output ordering is correct + # Ensure the output ordering is correct + assert sorted(result.items()) == sorted(expected_result.items()) def test_clean_roof_with_dwelling_above(self): result = RoofAttributes('(another dwelling above)').process() diff --git a/epc_data/tests/test_wall_attributes.py b/epc_data/tests/test_wall_attributes.py index f0dd55de..edfae17c 100644 --- a/epc_data/tests/test_wall_attributes.py +++ b/epc_data/tests/test_wall_attributes.py @@ -48,13 +48,5 @@ class TestWallAttributes: expected_result = test_case.copy() del expected_result["original_description"] result = WallAttributes(test_case['original_description']).process() - assert set(result.keys()) == { - 'is_as_built', 'is_assumed', 'is_sandstone_or_limestone', 'thermal_transmittance', - 'is_cavity_wall', 'is_filled_cavity', 'is_system_built', - 'external_insulation', 'is_solid_brick', 'is_timber_frame', 'internal_insulation', - 'is_cob', 'is_granite_or_whinstone', 'insulation_thickness', - 'thermal_transmittance_unit' - } - # Ensure the output ordering is correct assert sorted(result.items()) == sorted(expected_result.items())