Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.graphql.tests.functional.test_directory::test_get_directory_with_invalid_swhid
Failed

TEST RESULT

Run At
Sep 2 2022, 3:09 PM
Details
client = <FlaskClient <Flask 'swh.graphql.tests.conftest'>> def test_get_directory_with_invalid_swhid(client): query_str = """ { directory(swhid: "swh:1:dir:invalid") { swhid } } """ errors = utils.get_error_response(client, query_str) # API will throw an error in case of an invalid SWHID > assert len(errors) == 1 E assert 2 == 1 E + where 2 = len([{'message': 'Argument \'swhid\' has invalid value "swh:1:dir:invalid".\n\nGraphQL request:3:24\n2 | {\n3 | directory(swhid: "swh:1:dir:invalid") {\n | ^\n4 | swhid'}, {'locations': [{'column': 24, 'line': 3}], 'message': 'Expected value of type \'SWHID!\', found "swh:1:dir:invalid"; Input error: Invalid SWHID'}]) .tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/test_directory.py:35: AssertionError