Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.graphql.tests.functional.test_directory_entry::test_directory_entry_connection_filter_by_name[directory2]
Failed

TEST RESULT

Run At
Sep 27 2022, 3:40 PM
Details
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_directory_entry_connection_filter_by_name(client, directory): storage = server.get_storage() for dir_entry in storage.directory_ls(directory.id): name_include = dir_entry["name"][:-1].decode() query_str = """ { directory(swhid: "%s") { swhid entries(nameInclude: "%s") { nodes { targetType name { text } } } } } """ % ( directory.swhid(), name_include, ) > data, _ = utils.get_query_response(client, query_str) .tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/test_directory_entry.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ client = <FlaskClient <Flask 'swh.graphql.tests.conftest'>> query_str = '\n {\n directory(swhid: "swh:1:dir:d135a91ac82a754e7f4bdeff8d56ef06d921eb7d") {\n swhid\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:13\ 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