mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-07 15:58:49 +00:00
add coverage for labels
This commit is contained in:
parent
58e8bab83b
commit
8724702fef
@ -66,3 +66,38 @@ class TestReportTests(InvenTreeAPITestCase):
|
|||||||
'items': [10, 11, 12],
|
'items': [10, 11, 12],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
class TestLabels(InvenTreeAPITestCase):
|
||||||
|
"""
|
||||||
|
Tests for the StockItem TestReport templates
|
||||||
|
"""
|
||||||
|
|
||||||
|
fixtures = [
|
||||||
|
'category',
|
||||||
|
'part',
|
||||||
|
'location',
|
||||||
|
'stock',
|
||||||
|
]
|
||||||
|
|
||||||
|
roles = [
|
||||||
|
'stock.view',
|
||||||
|
'stock_location.view',
|
||||||
|
]
|
||||||
|
|
||||||
|
def do_list(self, filters={}):
|
||||||
|
|
||||||
|
response = self.client.get(self.list_url, filters, format='json')
|
||||||
|
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
|
return response.data
|
||||||
|
|
||||||
|
def test_lists(self):
|
||||||
|
self.list_url = reverse('api-stockitem-label-list')
|
||||||
|
self.do_list()
|
||||||
|
|
||||||
|
self.list_url = reverse('api-stocklocation-label-list')
|
||||||
|
self.do_list()
|
||||||
|
|
||||||
|
self.list_url = reverse('api-part-label-list')
|
||||||
|
self.do_list()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user