Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/tests/functional/test_directory_entry.py
Show All 11 Lines | |||||
from ..data import get_directories, get_directories_with_nested_path | from ..data import get_directories, get_directories_with_nested_path | ||||
def test_get_directory_entry_missing_path(client): | def test_get_directory_entry_missing_path(client): | ||||
directory = get_directories()[0] | directory = get_directories()[0] | ||||
path = "missing" | path = "missing" | ||||
query_str = """ | query_str = """ | ||||
{ | { | ||||
directoryEntry(swhid: "%s", path: "%s") { | directoryEntry(directorySwhid: "%s", path: "%s") { | ||||
name { | name { | ||||
text | text | ||||
} | } | ||||
targetType | targetType | ||||
target { | target { | ||||
...on Content { | ...on Content { | ||||
swhid | swhid | ||||
} | } | ||||
Show All 9 Lines | |||||
@pytest.mark.parametrize( | @pytest.mark.parametrize( | ||||
"directory", get_directories() + get_directories_with_nested_path() | "directory", get_directories() + get_directories_with_nested_path() | ||||
) | ) | ||||
def test_get_directory_entry(client, directory): | def test_get_directory_entry(client, directory): | ||||
storage = server.get_storage() | storage = server.get_storage() | ||||
query_str = """ | query_str = """ | ||||
{ | { | ||||
directoryEntry(swhid: "%s", path: "%s") { | directoryEntry(directorySwhid: "%s", path: "%s") { | ||||
name { | name { | ||||
text | text | ||||
} | } | ||||
targetType | targetType | ||||
target { | target { | ||||
...on Content { | ...on Content { | ||||
swhid | swhid | ||||
} | } | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |