summaryrefslogtreecommitdiff
path: root/tests/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'tests/frontend')
-rw-r--r--tests/frontend/project/sources/fetch_source.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/frontend/project/sources/fetch_source.py b/tests/frontend/project/sources/fetch_source.py
index 7c0df4595..ead5bc3f5 100644
--- a/tests/frontend/project/sources/fetch_source.py
+++ b/tests/frontend/project/sources/fetch_source.py
@@ -40,11 +40,10 @@ class FetchSource(Source):
def configure(self, node):
self.original_urls = node.get_sequence('urls').as_str_list()
self.output_file = node.get_str('output-text')
- self.fetch_succeeds = {}
- if 'fetch-succeeds' in node:
- fetch_succeeds_node = node.get_mapping('fetch-succeeds')
- for key, value in self.node_items(fetch_succeeds_node):
- self.fetch_succeeds[key] = value in ('True', 'true')
+ self.fetch_succeeds = {
+ key: value.as_bool()
+ for key, value in node.get_mapping('fetch-succeeds', {}).items()
+ }
# First URL is the primary one for this test
#