mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 19:20:55 +00:00
Server-side paginatino for build orders
This commit is contained in:
@ -244,6 +244,19 @@ class StockItemListTest(StockAPITestCase):
|
||||
response = self.get_stock(expired=0)
|
||||
self.assertEqual(len(response), 16)
|
||||
|
||||
def test_paginate(self):
|
||||
"""
|
||||
Test that we can paginate results correctly
|
||||
"""
|
||||
|
||||
for n in [1, 5, 10]:
|
||||
response = self.get_stock(limit=n)
|
||||
|
||||
self.assertIn('count', response)
|
||||
self.assertIn('results', response)
|
||||
|
||||
self.assertEqual(len(response['results']), n)
|
||||
|
||||
|
||||
class StockItemTest(StockAPITestCase):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user