mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Added pytest.mark.paramterize to floor tests
This commit is contained in:
parent
2745076f19
commit
3847331e9d
2 changed files with 10 additions and 9 deletions
|
|
@ -19,14 +19,16 @@ class TestCleanFloor:
|
|||
with pytest.raises(ValueError):
|
||||
FloorAttributes('description without keywords')
|
||||
|
||||
def test_process_floor(self):
|
||||
for test_case in clean_floor_cases:
|
||||
result = FloorAttributes(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_floor_cases
|
||||
)
|
||||
def test_process_floor(self, test_case):
|
||||
expected_result = test_case.copy()
|
||||
del expected_result["original_description"]
|
||||
result = FloorAttributes(test_case['original_description']).process()
|
||||
# Ensure the output ordering is correct
|
||||
assert sorted(result.items()) == sorted(expected_result.items())
|
||||
|
||||
def test_invalid_description(self):
|
||||
# Test that invalid descriptions raise a ValueError
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ class TestRoofAttributes:
|
|||
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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue