add missing permissions to test

This commit is contained in:
Matthias Mair 2026-06-24 01:03:00 +02:00
parent fee869e92a
commit e2d493f00d
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
3 changed files with 12 additions and 0 deletions

View File

@ -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):

View File

@ -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."""

View File

@ -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()