aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-12-03 21:58:11 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-12-03 21:58:11 +0100
commitf32c435c207f439abb66de5dbb6a1b67a75d0405 (patch)
tree8604255831074571437f7c346cf2f17c39458992 /tests
parent560091e02fd90a98cb79c808d8bb2000c60b9e67 (diff)
downloadfuzzycat-f32c435c207f439abb66de5dbb6a1b67a75d0405.tar.gz
fuzzycat-f32c435c207f439abb66de5dbb6a1b67a75d0405.zip
add case
Diffstat (limited to 'tests')
-rw-r--r--tests/data/release/phqelg6oc5hs5dehhgmodcnh5u24
-rw-r--r--tests/data/release/zlywxoy7cfexvaatziqp4ip5m424
-rw-r--r--tests/data/verify.csv1
-rw-r--r--tests/test_verify.py4
4 files changed, 51 insertions, 2 deletions
diff --git a/tests/data/release/phqelg6oc5hs5dehhgmodcnh5u b/tests/data/release/phqelg6oc5hs5dehhgmodcnh5u
new file mode 100644
index 0000000..2386a7f
--- /dev/null
+++ b/tests/data/release/phqelg6oc5hs5dehhgmodcnh5u
@@ -0,0 +1,24 @@
+{
+ "abstracts": [],
+ "contribs": [],
+ "ext_ids": {
+ "doi": "10.7916/d8rr2t04"
+ },
+ "extra": {
+ "datacite": {
+ "metadataVersion": 3
+ },
+ "release_month": 8
+ },
+ "ident": "phqelg6oc5hs5dehhgmodcnh5u",
+ "publisher": "Columbia University",
+ "refs": [],
+ "release_date": "2017-08-17",
+ "release_stage": "published",
+ "release_type": "article",
+ "release_year": 2017,
+ "revision": "7fa57bde-8630-47a2-9f33-f87257e77679",
+ "state": "active",
+ "title": "Eastern questionnaire, answer sheet for Interviewee 52223, page 194",
+ "work_id": "sqm5fkxxnjhf7fo2ln4lzgevja"
+}
diff --git a/tests/data/release/zlywxoy7cfexvaatziqp4ip5m4 b/tests/data/release/zlywxoy7cfexvaatziqp4ip5m4
new file mode 100644
index 0000000..4ed1fe3
--- /dev/null
+++ b/tests/data/release/zlywxoy7cfexvaatziqp4ip5m4
@@ -0,0 +1,24 @@
+{
+ "abstracts": [],
+ "contribs": [],
+ "ext_ids": {
+ "doi": "10.7916/d8n0229j"
+ },
+ "extra": {
+ "datacite": {
+ "metadataVersion": 2
+ },
+ "release_month": 8
+ },
+ "ident": "zlywxoy7cfexvaatziqp4ip5m4",
+ "publisher": "Columbia University",
+ "refs": [],
+ "release_date": "2017-08-17",
+ "release_stage": "published",
+ "release_type": "article",
+ "release_year": 2017,
+ "revision": "766922dd-17c4-4d2c-bdf5-ece79413d300",
+ "state": "active",
+ "title": "Eastern questionnaire, answer sheet for Interviewee 52223, page 194",
+ "work_id": "rnhzlq2y5fbe5dnynfh7qnnlf4"
+}
diff --git a/tests/data/verify.csv b/tests/data/verify.csv
index 058a471..16ee457 100644
--- a/tests/data/verify.csv
+++ b/tests/data/verify.csv
@@ -112,3 +112,4 @@ zkqujozrx5cnjitmglclt6heqq,urr2gs4dsbbwdl7asgyqnwwtxy,Status.AMBIGUOUS,Miss.BLAC
iwtrxnov2repzlgoi2at2md6tm,s5hm65waingwjmgf3plu76hzu4,Status.AMBIGUOUS,
iwtrxnov2repzlgoi2at2md6tm,t6k5mec4xjdebcs3iv3uzs3yvu,Status.AMBIGUOUS,
s5hm65waingwjmgf3plu76hzu4,t6k5mec4xjdebcs3iv3uzs3yvu,Status.AMBIGUOUS,
+zlywxoy7cfexvaatziqp4ip5m4,phqelg6oc5hs5dehhgmodcnh5u,Status.EXACT,OK.DATACITE_VERSION
diff --git a/tests/test_verify.py b/tests/test_verify.py
index a80dcda..533a5ba 100644
--- a/tests/test_verify.py
+++ b/tests/test_verify.py
@@ -46,8 +46,8 @@ def test_compare():
.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)
+ expected_status] == status, "status: want {}, got {} {} for {} {}".format(
+ expected_status, status, reason, a, b)
if expected_reason:
assert expected_reason.lower() == reason.lower(
), "reason [{base}release/{a} {base}release/{b}]: want {reason}, got {expected_reason}".format(