Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
fix test for page size
Browse files Browse the repository at this point in the history
  • Loading branch information
localhuman committed Feb 16, 2018
1 parent f3590b1 commit b011b83
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion neo/api/REST/test_notification_rest_api.py
Expand Up @@ -182,11 +182,19 @@ def test_pagination_for_addr_results(self):
jsn = json.loads(res)
self.assertEqual(jsn['total'], 1027)
results = jsn['results']
self.assertEqual(len(results), 1000)
self.assertEqual(len(results), 500)

mock_req = requestMock(path=b'/addr/AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM?page=1')
res = self.app.get_by_addr(mock_req, 'AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM')
jsn = json.loads(res)
self.assertEqual(jsn['total'], 1027)
results = jsn['results']
self.assertEqual(len(results), 500)


mock_req = requestMock(path=b'/addr/AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM?page=2')
res = self.app.get_by_addr(mock_req, 'AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM')
jsn = json.loads(res)
self.assertEqual(jsn['total'], 1027)
results = jsn['results']
self.assertEqual(len(results), 27)

0 comments on commit b011b83

Please sign in to comment.