From 6589bffcde0ece37f4976553407ee849af7f28b5 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Wed, 23 Sep 2020 00:45:38 +0200 Subject: 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. --- python/tests/import_datacite.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python/tests') 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 -- cgit v1.2.3