add missing permissions to test
This commit is contained in:
parent
fee869e92a
commit
e2d493f00d
|
|
@ -15,6 +15,7 @@ class BarcodeAPITest(InvenTreeAPITestCase):
|
|||
"""Tests for barcode api."""
|
||||
|
||||
fixtures = ['category', 'part', 'location', 'stock']
|
||||
roles = ['stock.view', 'stock_location.view', 'part.view']
|
||||
|
||||
def setUp(self):
|
||||
"""Setup for all tests."""
|
||||
|
|
@ -259,6 +260,7 @@ class SOAllocateTest(InvenTreeAPITestCase):
|
|||
"""Unit tests for the barcode endpoint for allocating items to a sales order."""
|
||||
|
||||
fixtures = ['category', 'company', 'part', 'location', 'stock']
|
||||
roles = ['stock.view']
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class TestInvenTreeBarcode(InvenTreeAPITestCase):
|
|||
"""Tests for the integrated InvenTreeBarcode barcode plugin."""
|
||||
|
||||
fixtures = ['category', 'part', 'location', 'stock', 'company', 'supplier_part']
|
||||
roles = ['stock.view', 'stock_location.view', 'part.view']
|
||||
|
||||
def setUp(self):
|
||||
"""Set up the test case."""
|
||||
|
|
|
|||
|
|
@ -14,6 +14,13 @@ class SupplierBarcodeTests(InvenTreeAPITestCase):
|
|||
"""Tests barcode parsing for all suppliers."""
|
||||
|
||||
SCAN_URL = reverse('api-barcode-scan')
|
||||
roles = [
|
||||
'stock.view',
|
||||
'stock_location.view',
|
||||
'part.view',
|
||||
'company.view',
|
||||
'order.view',
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
|
|
@ -176,6 +183,8 @@ class SupplierBarcodeTests(InvenTreeAPITestCase):
|
|||
class SupplierBarcodePOReceiveTests(InvenTreeAPITestCase):
|
||||
"""Tests barcode scanning to receive a purchase order item."""
|
||||
|
||||
roles = ['stock.view', 'stock_location.view']
|
||||
|
||||
def setUp(self):
|
||||
"""Create supplier part and purchase_order."""
|
||||
super().setUp()
|
||||
|
|
|
|||
Loading…
Reference in New Issue