From 43b14ada51d80d2d411fd9bcfd9a1d033c81bc7c Mon Sep 17 00:00:00 2001 From: VA Date: Sun, 24 Jun 2018 21:04:35 +0200 Subject: [PATCH] config check: update since weboob now uses real Python enums --- flatisfy/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flatisfy/config.py b/flatisfy/config.py index c9dfd32..802711b 100644 --- a/flatisfy/config.py +++ b/flatisfy/config.py @@ -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"]