client = <FlaskClient <Flask 'swh.graphql.tests.conftest'>>
directory = Directory(entries=(DirectoryEntry(name=b'file1.ext', type='file', target=hash_to_bytes('111111111111111111111111111111...fest=b'tree 34\x0000644 file1.ext\x00\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11')
@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:d135a91ac82a754e7f4bdeff8d56ef06d921eb7d") {\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