aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/import_matched.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-14 20:57:15 +0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-14 20:57:15 +0800
commite2deb74b7839aa05c1827a830ffc5e3c68ed58b4 (patch)
treee5fc7b05f072d9b321647b64c4cf07350bb0e629 /python/tests/import_matched.py
parent28880401a4d64f9cc1317a3f3bf515166a812c1b (diff)
downloadfatcat-e2deb74b7839aa05c1827a830ffc5e3c68ed58b4.tar.gz
fatcat-e2deb74b7839aa05c1827a830ffc5e3c68ed58b4.zip
fix brittle/flapping python matched test
Diffstat (limited to 'python/tests/import_matched.py')
-rw-r--r--python/tests/import_matched.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/tests/import_matched.py b/python/tests/import_matched.py
index 85e21267..4f2f0867 100644
--- a/python/tests/import_matched.py
+++ b/python/tests/import_matched.py
@@ -25,8 +25,10 @@ def test_matched_dict_parse(matched_importer):
assert f.md5 == "f4de91152c7ab9fdc2a128f962faebff"
assert f.mimetype == "application/pdf"
assert f.size == 255629
- assert f.urls[1].url.startswith("http://journals.plos.org")
- assert f.urls[1].rel == "web"
- assert f.urls[0].url.startswith("https://web.archive.org/")
- assert f.urls[0].rel == "webarchive"
+ assert len(f.urls) == 2
+ for u in f.urls:
+ if u.rel == "web":
+ assert u.url.startswith("http://journals.plos.org")
+ if u.rel == "webarchive":
+ assert u.url.startswith("https://web.archive.org/")
assert len(f.releases) == 1