aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2020-06-29 19:35:06 +0000
committerbnewbold <bnewbold@archive.org>2020-06-29 19:35:06 +0000
commitcc6361e2b87c5ed7af82be8e0c79ddb1f91af1ce (patch)
treed693068634bfa2ecb7e82990ea586a09b1895585 /python/tests
parented1893bbc1e5e26c095a5e1f6ba3d1b15a959bab (diff)
parent9f0e3f2af03161337b86308db0d1142b158282db (diff)
downloadfatcat-cc6361e2b87c5ed7af82be8e0c79ddb1f91af1ce.tar.gz
fatcat-cc6361e2b87c5ed7af82be8e0c79ddb1f91af1ce.zip
Merge branch 'martin-datacite-fix-strptime-36559' into 'master'
datacite: hard cast possible date value to string See merge request webgroup/fatcat!59
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/import_datacite.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/tests/import_datacite.py b/python/tests/import_datacite.py
index c9210ea4..afee06cc 100644
--- a/python/tests/import_datacite.py
+++ b/python/tests/import_datacite.py
@@ -174,6 +174,7 @@ def test_parse_datacite_dates():
Case('empty list is None', [], (None, None, None)),
Case('empty item is None', [{}], (None, None, None)),
Case('year only yields year only', [{'date': '2019'}], (None, None, 2019)),
+ Case('int year', [{'date': 2019}], (None, None, 2019)),
Case('first wins', [{'date': '2019'}, {'date': '2020'}], (None, None, 2019)),
Case('skip bogus year', [{'date': 'abc'}, {'date': '2020'}], (None, None, 2020)),
Case('first with type', [