mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-12-23 13:04:39 +01:00
tests: Fix totalPages
A few months ago I fixed the totalPages display to show 1 when we
only have one page of results (the page itself is still 0), but I
didn't update the tests.
See: 4f8cd1097b
This commit is contained in:
parent
b009820fb4
commit
dd1769b954
@ -312,7 +312,7 @@ def test_post_collections_valid_page(client):
|
||||
assert response.status_code == 200
|
||||
assert response.json["limit"] == 100
|
||||
assert response.json["currentPage"] == 0
|
||||
assert response.json["totalPages"] == 0
|
||||
assert response.json["totalPages"] == 1
|
||||
assert len(response.json["statistics"]) == 2
|
||||
assert isinstance(response.json["statistics"][0]["views"], int)
|
||||
assert isinstance(response.json["statistics"][0]["downloads"], int)
|
||||
|
@ -312,7 +312,7 @@ def test_post_communities_valid_page(client):
|
||||
assert response.status_code == 200
|
||||
assert response.json["limit"] == 100
|
||||
assert response.json["currentPage"] == 0
|
||||
assert response.json["totalPages"] == 0
|
||||
assert response.json["totalPages"] == 1
|
||||
assert len(response.json["statistics"]) == 2
|
||||
assert isinstance(response.json["statistics"][0]["views"], int)
|
||||
assert isinstance(response.json["statistics"][0]["downloads"], int)
|
||||
|
@ -312,7 +312,7 @@ def test_post_items_valid_page(client):
|
||||
assert response.status_code == 200
|
||||
assert response.json["limit"] == 100
|
||||
assert response.json["currentPage"] == 0
|
||||
assert response.json["totalPages"] == 0
|
||||
assert response.json["totalPages"] == 1
|
||||
assert len(response.json["statistics"]) == 2
|
||||
assert isinstance(response.json["statistics"][0]["views"], int)
|
||||
assert isinstance(response.json["statistics"][0]["downloads"], int)
|
||||
|
Loading…
Reference in New Issue
Block a user