Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.deposit.tests.api.test_checks::test_api_checks_check_metadata_ok[chardata-in-affiliation]
Failed

TEST RESULT

Run At
Mar 8 2022, 5:51 PM
Details
metadata_ok = '<entry xmlns="http://www.w3.org/2005/Atom"\n xmlns:swh="https://www.softwareheritage.org/schema/2018/deposit"\n...hema:url>some-metadata-provenance-url</schema:url>\n </swh:metadata-provenance>\n </swh:deposit>\n</entry>\n' swh_checks_deposit = <swh.deposit.api.private.deposit_check.APIChecks object at 0x7fdfedf2ef28> @pytest.mark.parametrize( "metadata_ok", _parameters1, ) def test_api_checks_check_metadata_ok(metadata_ok, swh_checks_deposit): actual_check, detail = check_metadata(ElementTree.fromstring(metadata_ok)) > assert actual_check is True, f"Unexpected result:\n{pprint.pformat(detail)}" E AssertionError: Unexpected result: E {'metadata': [{'fields': ['codemeta:author'], E 'summary': 'failed validating <Element ' E "'{https://doi.org/10.5063/SCHEMA/CODEMETA-2.0}affiliation' " E "at 0x7fdfedf28a98> with Xsd11Group(model='all', " E 'occurs=[1, 1]):\n' E '\n' E 'Reason: character data between child elements not ' E 'allowed\n' E '\n' E 'Schema:\n' E '\n' E ' <xsd:complexType ' E 'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' E 'name="PersonOrOrganization">\n' E ' \n' E ' <xsd:all>\n' E ' <xsd:element ref="codemeta:name" />\n' E ' <xsd:any maxOccurs="unbounded" minOccurs="0" ' E 'processContents="lax" />\n' E ' </xsd:all>\n' E ' </xsd:complexType>\n' E '\n' E 'Instance:\n' E '\n' E ' <codemeta:affiliation ' E 'xmlns:codemeta="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0">My ' E 'Orga</codemeta:affiliation>\n' E '\n' E 'Path: ' E '/{https://doi.org/10.5063/SCHEMA/CODEMETA-2.0}author/{https://doi.org/10.5063/SCHEMA/CODEMETA-2.0}affiliation\n'}]} E assert False is True .tox/py3/lib/python3.7/site-packages/swh/deposit/tests/api/test_checks.py:379: AssertionError