config check: update since weboob now uses real Python enums
This commit is contained in:
parent
0c9f7d3067
commit
43b14ada51
@ -156,7 +156,7 @@ def validate_config(config, check_with_data):
|
|||||||
for constraint in config["constraints"].values():
|
for constraint in config["constraints"].values():
|
||||||
assert "type" in constraint
|
assert "type" in constraint
|
||||||
assert isinstance(constraint["type"], str)
|
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
|
assert "minimum_nb_photos" in constraint
|
||||||
if constraint["minimum_nb_photos"]:
|
if constraint["minimum_nb_photos"]:
|
||||||
@ -172,7 +172,7 @@ def validate_config(config, check_with_data):
|
|||||||
assert "house_types" in constraint
|
assert "house_types" in constraint
|
||||||
assert constraint["house_types"]
|
assert constraint["house_types"]
|
||||||
for house_type in 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 "postal_codes" in constraint
|
||||||
assert constraint["postal_codes"]
|
assert constraint["postal_codes"]
|
||||||
|
Loading…
Reference in New Issue
Block a user