def test_directory_path(admin_client, file_tree_a):
res = admin_client.get(
"/v3/directories",
{
"pagination": False,
"path": "/dir",
**file_tree_a["params"],
},
)
assert res.status_code == 200
assert_nested_subdict(
{
"directory": {"file_count": 15, "size": 15 * 1024},
"directories": [
{"name": "sub1"},
{"name": "sub2"},
{"name": "sub3"},
{"name": "sub4"},
{"name": "sub5"},
{"name": "sub6"},
],
"files": [
{"filename": "a.txt"},
{"filename": "b.txt"},
{"filename": "c.txt"},
{"filename": "d.txt"},
{"filename": "e.txt"},
{"filename": "f.txt"},
],
},
res.data,
check_list_length=True,
)