aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fuzzycat/verify.py2
-rw-r--r--tests/test_verify.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py
index 2eff873..9848735 100644
--- a/fuzzycat/verify.py
+++ b/fuzzycat/verify.py
@@ -182,7 +182,7 @@ def compare(a, b):
# beware: we have versions and "isPartOf", e.g. https://api.fatcat.wiki/v0/release/ybxygpeypbaq5pfrztu3z2itw4
# TODO: does glom help?
# ...
- if "datacite" in a.get("extra") and "datacite" in b.get("extra"):
+ if "datacite" in (a.get("extra", []) or []) and "datacite" in (b.get("extra", []) or []):
whitelist = set([
"HasPart",
"HasVersion",
diff --git a/tests/test_verify.py b/tests/test_verify.py
index 4789311..d740c06 100644
--- a/tests/test_verify.py
+++ b/tests/test_verify.py
@@ -45,8 +45,9 @@ def test_compare():
"skipping test {base}release/{a} {base}release/{b} -- no result defined (we think {status}, {reason})"
.format(a=a, b=b, base=FATCAT_BASE_URL, status=status, reason=reason))
continue
- assert status_mapping[expected_status] == status, "status: want {}, got {} for {} {}".format(
- expected_status, status, a, b)
+ assert status_mapping[
+ expected_status] == status, "status: want {}, got {} for {} {}".format(
+ expected_status, status, a, b)
if expected_reason:
assert expected_reason.lower() == reason.lower(
), "reason [{} {}]: want {}, got {}".format(a, b, expected_reason, reason)