Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7066269
D5764.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D5764.id.diff
View Options
diff --git a/swh/deposit/tests/api/test_deposit_list.py b/swh/deposit/tests/api/test_deposit_private_list.py
rename from swh/deposit/tests/api/test_deposit_list.py
rename to swh/deposit/tests/api/test_deposit_private_list.py
--- a/swh/deposit/tests/api/test_deposit_list.py
+++ b/swh/deposit/tests/api/test_deposit_private_list.py
@@ -36,16 +36,13 @@
deposit_id = partial_deposit.id
deposit_id2 = deposited_deposit.id
- # NOTE: does not work as documented
- # https://docs.djangoproject.com/en/1.11/ref/urlresolvers/#django.core.urlresolvers.reverse # noqa
- # url = reverse(PRIVATE_LIST_DEPOSITS, kwargs={'page_size': 1})
main_url = reverse(PRIVATE_LIST_DEPOSITS)
url = "%s?page_size=1" % main_url
response = authenticated_client.get(url)
assert response.status_code == status.HTTP_200_OK
data = response.json()
- assert data["count"] == 2 # 2 deposits
+ assert data["count"] == 2 # total result of 2 deposits if consuming all results
expected_next = f"{main_url}?page=2&page_size=1"
assert data["next"].endswith(expected_next) is True
assert data["previous"] is None
@@ -62,7 +59,7 @@
assert response2.status_code == status.HTTP_200_OK
data2 = response2.json()
- assert data2["count"] == 2 # still 2 deposits
+ assert data["count"] == 2 # total result of 2 deposits if consuming all results
assert data2["next"] is None
expected_previous = f"{main_url}?page_size=1"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Nov 5 2024, 4:32 AM (8 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218298
Attached To
D5764: tests: Rename test_deposit_list.py to test_deposit_private_list.py
Event Timeline
Log In to Comment