client = <FlaskClient <Flask 'swh.graphql.tests.conftest'>>
def test_get_snapshot_invalid_swhid(client):
query_str = """
{
snapshot(swhid: "swh:1:snp:invalid") {
swhid
}
}
"""
errors = get_error_response(client, query_str)
> assert len(errors) == 1
E assert 2 == 1
E + where 2 = len([{'message': 'Argument \'swhid\' has invalid value "swh:1:snp:invalid".\n\nGraphQL request:3:23\n2 | {\n3 | snapshot(swhid: "swh:1:snp:invalid") {\n | ^\n4 | swhid'}, {'locations': [{'column': 23, 'line': 3}], 'message': 'Expected value of type \'SWHID!\', found "swh:1:snp:invalid"; Input error: Invalid SWHID'}])
.tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/test_snapshot_node.py:56: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Sep 30 2022, 3:34 PM