backend.testoai module

class backend.testoai.OaiTest(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

create(*args, **kwargs)[source]
delete(identifier)[source]
setUp()[source]
test_base_doctype()[source]
test_create_already_existing()[source]

Creation of a paper from an OAI record, when the exact same OAI record already exists.

test_create_incomplete_metadata(*args, **kwargs)[source]

When we are trying to create a new paper for an incomplete OAI record (in this case, a publication date is missing). Ideally we would still like to match it with the first paper via fingerprint, to add the relevant url.

test_create_invalid_format()[source]

Fetching with an invalid format from OAI

test_create_invalid_identifier()[source]

Fetching an invalid identifier from OAI

test_create_invalid_metadata()[source]

Metadata that we don’t accept

test_create_match_doi()[source]

Addition of an OAI record when it is matched to an existing paper by DOI

test_create_match_fp()[source]

Addition of an OAI record when it is matched with an existing record by fingerprint.

test_create_match_identifier()[source]

An OAI record with the same identifier already exists but it has been already merged before with another paper with a different fingerprint.

test_create_no_match()[source]

Creation of a paper from an OAI record, when the paper does not exist yet.

test_crossref_invalid_metadata()[source]
test_datacite()[source]
test_pmc()[source]
test_update_pdf_url()[source]

Two OAI records share the same splash URL, but the second one has a pdf_url. We should add the PDF url to the existing OAI record (merge the two records).