aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-09-23 00:45:38 +0200
committerMartin Czygan <martin.czygan@gmail.com>2020-09-23 00:45:38 +0200
commit6589bffcde0ece37f4976553407ee849af7f28b5 (patch)
treead89a3c8f56620d341cc35aecbca44f051443d0d /python/tests
parent5c879f7f147b11d1013772b2f9a74442984f58fc (diff)
downloadfatcat-6589bffcde0ece37f4976553407ee849af7f28b5.tar.gz
fatcat-6589bffcde0ece37f4976553407ee849af7f28b5.zip
address spammy datacite titles
seemingly from zenodo: * https://fatcat.wiki/release/rzcpjwukobd4pj36ipla22cnoi * https://doi.org/10.5281/zenodo.4041777 About 3400 records with "FULL MOVIE" in title, currently.
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/import_datacite.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/tests/import_datacite.py b/python/tests/import_datacite.py
index ba09ba74..6bc0e7b8 100644
--- a/python/tests/import_datacite.py
+++ b/python/tests/import_datacite.py
@@ -318,6 +318,12 @@ def test_parse_datacite_dates():
result = parse_datacite_dates(case.input)
assert result == case.result, case.about
+def test_datacite_spammy_title(datacite_importer):
+ r = datacite_importer.parse_record({"title": """HD! My Hero academia
+ Heroes: Rising [2020]Full Movie Watch
+ Online And Free Download""",
+ "attributes": {"doi": "10.1234/1234"}})
+ assert r == False
def test_datacite_importer(datacite_importer):
last_index = datacite_importer.api.get_changelog(limit=1)[0].index