client = <FlaskClient <Flask 'swh.graphql.tests.conftest'>>
def test_get_release_with_invalid_swhid(client):
query_str = """
{
release(swhid: "swh:1:rel: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:rel:invalid".\n\nGraphQL request:3:22\n2 | {\n3 | release(swhid: "swh:1:rel:invalid") {\n | ^\n4 | swhid'}, {'locations': [{'column': 22, 'line': 3}], 'message': 'Expected value of type \'SWHID!\', found "swh:1:rel:invalid"; Input error: Invalid SWHID'}])
.tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/test_release_node.py:85: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Sep 27 2022, 3:40 PM