Skip to content

Commit 576a9dc

Browse files
committed
uncomment test
1 parent 8862c93 commit 576a9dc

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tests/resources/test_collection.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -391,19 +391,19 @@ async def test_get_collections_search_limit_offset(
391391
prev_link = list(filter(lambda link: link["rel"] == "previous", links))[0]
392392
assert prev_link["href"].endswith("?limit=1&offset=2")
393393

394-
# ###################
395-
# # offset=3,limit=2
396-
# resp = await app_client.get(
397-
# "/collections",
398-
# params={"limit": 2,"offset": 3},
399-
# )
400-
# cols = resp.json()["collections"]
401-
# links = resp.json()["links"]
402-
# assert len(cols) == 0
403-
# assert len(links) == 3
404-
# assert {"root", "self", "previous"} == {link["rel"] for link in links}
405-
# prev_link = list(filter(lambda link: link["rel"] == "previous", links))[0]
406-
# assert prev_link["href"].endswith("?limit=1&offset=2")
394+
###################
395+
# limit=2, offset=3, there should not be a next link
396+
resp = await app_client.get(
397+
"/collections",
398+
params={"limit": 2, "offset": 3},
399+
)
400+
cols = resp.json()["collections"]
401+
links = resp.json()["links"]
402+
assert len(cols) == 0
403+
assert len(links) == 3
404+
assert {"root", "self", "previous"} == {link["rel"] for link in links}
405+
prev_link = list(filter(lambda link: link["rel"] == "previous", links))[0]
406+
assert prev_link["href"].endswith("?limit=2&offset=1")
407407

408408
###################
409409
# offset=1, should have a `previous` link

0 commit comments

Comments
 (0)