Commit 43b14ada authored by VA's avatar VA

config check: update since weboob now uses real Python enums

parent 0c9f7d30
Pipeline #59371 failed with stage
in 7 minutes and 28 seconds
......@@ -156,7 +156,7 @@ def validate_config(config, check_with_data):
for constraint in config["constraints"].values():
assert "type" in constraint
assert isinstance(constraint["type"], str)
assert constraint["type"].upper() in POSTS_TYPES.keys
assert constraint["type"].upper() in POSTS_TYPES.__members__
assert "minimum_nb_photos" in constraint
if constraint["minimum_nb_photos"]:
......@@ -172,7 +172,7 @@ def validate_config(config, check_with_data):
assert "house_types" in constraint
assert constraint["house_types"]
for house_type in constraint["house_types"]:
assert house_type.upper() in HOUSE_TYPES.keys
assert house_type.upper() in HOUSE_TYPES.__members__
assert "postal_codes" in constraint
assert constraint["postal_codes"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment