Merge branch 'ntome/Flatisfy-master'

This commit is contained in:
Lucas Verney 2018-06-25 10:22:23 +02:00
commit 540d69f9e2

View File

@ -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"]