Skip to content

Commit

Permalink
Add unit test for pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Jul 11, 2022
1 parent 9ad6c41 commit 29c2db0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_part.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ def test_caps(self):

self.assertEqual(len(parts), n_parts + 10)

def test_pagination(self):
""" Test that we can paginate the queryset by specifying a 'limit' parameter"""

parts = Part.list(self.api, limit=5)
self.assertEqual(len(parts), 5)

for p in parts:
self.assertTrue(type(p) is Part)

def test_part_list(self):
"""
Check that we can list Part objects,
Expand Down

0 comments on commit 29c2db0

Please sign in to comment.