client = <FlaskClient <Flask 'swh.graphql.tests.conftest'>>
directory = Directory(entries=(DirectoryEntry(name=b'file1.ext', type='file', target=hash_to_bytes('86bc6b377e9d25f9d26777a4a28d08...08e64e0c1cb6a4431'), perms=0o160000)), id=hash_to_bytes('87b339104f7dc2a8163dec988445e3987995545f'), raw_manifest=None)
@pytest.mark.parametrize("directory", get_directories())
def test_get_directory_entry_connection(client, directory):
query_str = """
{
directory(swhid: "%s") {
swhid
entries {
nodes {
type
name {
text
}
}
}
}
}
"""
> data, _ = utils.get_query_response(client, query_str % directory.swhid())
.tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/test_directory_entry.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
client = <FlaskClient <Flask 'swh.graphql.tests.conftest'>>
query_str = '\n {\n directory(swhid: "swh:1:dir:87b339104f7dc2a8163dec988445e3987995545f") {\n swhid\n entri...n type\n name {\n text\n }\n }\n }\n }\n }\n '
def get_query_response(client, query_str: str) -> Tuple[Dict, Dict]:
response = get_response(client, query_str)
> assert response.status_code == 200, response.data
E AssertionError: b'{"errors":[{"message":"Argument \'first\' of required type \'Int!\' was not provided.\
E \
E GraphQL request:5:9\
E 4 |...line":5}],"message":"Field \'entries\' argument \'first\' of type \'Int!\' is required, but it was not provided."}]}
E '
E assert 400 == 200
E + where 400 = <WrapperTestResponse streamed [400 BAD REQUEST]>.status_code
.tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/utils.py:16: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Aug 30 2022, 3:25 PM