summaryrefslogtreecommitdiff
path: root/tests/frontend/project/sources/fetch_source.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/frontend/project/sources/fetch_source.py')
-rw-r--r--tests/frontend/project/sources/fetch_source.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/frontend/project/sources/fetch_source.py b/tests/frontend/project/sources/fetch_source.py
index cb3ab024e..51bfe1049 100644
--- a/tests/frontend/project/sources/fetch_source.py
+++ b/tests/frontend/project/sources/fetch_source.py
@@ -22,16 +22,10 @@ class FetchFetcher(SourceFetcher):
self.mark_download_url(url)
def fetch(self, alias_override=None):
- url = self.source.translate_url(
- self.original_url, alias_override=alias_override, primary=self.primary
- )
+ url = self.source.translate_url(self.original_url, alias_override=alias_override, primary=self.primary)
with open(self.source.output_file, "a") as f:
- success = (
- url in self.source.fetch_succeeds and self.source.fetch_succeeds[url]
- )
- message = "Fetch {} {} from {}\n".format(
- self.original_url, "succeeded" if success else "failed", url
- )
+ success = url in self.source.fetch_succeeds and self.source.fetch_succeeds[url]
+ message = "Fetch {} {} from {}\n".format(self.original_url, "succeeded" if success else "failed", url)
f.write(message)
if not success:
raise SourceError("Failed to fetch {}".format(url))
@@ -42,10 +36,7 @@ class FetchSource(Source):
def configure(self, node):
self.original_urls = node.get_str_list("urls")
self.output_file = node.get_str("output-text")
- self.fetch_succeeds = {
- key: value.as_bool()
- for key, value in node.get_mapping("fetch-succeeds", {}).items()
- }
+ 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
#