Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Test permissions for warehouse views
Mira Szewczyk404a0800622f
diff --git a/tests/conftest.py b/tests/conftest.pyindex 5bba011599..c4855fbe65 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -78,6 +78,7 @@ from saleor.shipping.models import ()from saleor.site import AuthenticationBackendsfrom saleor.site.models import AuthorizationKey, SiteSettings+from saleor.warehouse.models import Warehousefrom saleor.webhook.event_types import WebhookEventTypefrom saleor.webhook.models import Webhookfrom saleor.wishlist.models import Wishlist@@ -569,6 +570,11 @@ def permission_manage_service_accounts():return Permission.objects.get(codename="manage_service_accounts")+def permission_manage_warehouses():+ return Permission.objects.get(codename="manage_warehouses")++@pytest.fixturedef product_type(color_attribute, size_attribute):product_type = ProductType.objects.create(@@ -1769,6 +1775,7 @@ def mock_get_manager(mocker, fake_payment_interface):@pytest.fixture+<<<<<<< HEADdef staff_notification_recipient(db, staff_user):return StaffNotificationRecipient.objects.create(active=True, user=staff_user)@@ -1797,3 +1804,12 @@ def customer_wishlist_item_with_two_variants(item = customer_wishlist.add_variant(variant_1)item.variants.add(variant_2)return item+=======+def warehouse(address, shipping_zone):+ warehouse = Warehouse.objects.create(+ address=address, name="Example Warehouse", email="[email protected]"+ )+ warehouse.shipping_zones.add(shipping_zone)+ warehouse.save()+ return warehouse+>>>>>>> Test permissions for warehouse views