Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/api/test_checks.py
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | |||||
_parameters3 = [ | _parameters3 = [ | ||||
(textwrap.dedent(metadata_ko), expected_summary) | (textwrap.dedent(metadata_ko), expected_summary) | ||||
for (metadata_ko, expected_summary) in [ | for (metadata_ko, expected_summary) in [ | ||||
( | ( | ||||
f"""\ | f"""\ | ||||
<entry {XMLNS}> | <entry {XMLNS}> | ||||
<url>some url</url> | |||||
<codemeta:name> | |||||
<codemeta:name>bar</codemeta:name> | |||||
</codemeta:name> | |||||
<author>no one</author> | |||||
{PROVENANCE_XML} | |||||
</entry> | |||||
""", | |||||
[ | |||||
{ | |||||
"summary": ".*Reason: a simple content element can't have child elements.*", | |||||
"fields": ["codemeta:name"], | |||||
}, | |||||
], | |||||
), | |||||
( | |||||
f"""\ | |||||
<entry {XMLNS}> | |||||
<url>something</url> | <url>something</url> | ||||
<external_identifier>something-else</external_identifier> | <external_identifier>something-else</external_identifier> | ||||
<title>bar</title> | <title>bar</title> | ||||
<author>someone</author> | <author>someone</author> | ||||
<codemeta:datePublished>2020-aa-21</codemeta:datePublished> | <codemeta:datePublished>2020-aa-21</codemeta:datePublished> | ||||
<codemeta:dateCreated>2020-12-bb</codemeta:dateCreated> | <codemeta:dateCreated>2020-12-bb</codemeta:dateCreated> | ||||
{PROVENANCE_XML} | {PROVENANCE_XML} | ||||
</entry> | </entry> | ||||
▲ Show 20 Lines • Show All 274 Lines • Show Last 20 Lines |