Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add test
michal7e34f8890b72
diff --git a/tests/conftest.py b/tests/conftest.pyindex 908d5e459a..cc85d6b08d 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -7,9 +7,7 @@ import pytestfrom io import BytesIOfrom PIL import Image-from django.contrib.auth.models import AnonymousUserfrom django.contrib.sites.models import Site-from django.utils.encoding import smart_textfrom django.core.files.uploadedfile import SimpleUploadedFilefrom django.contrib.auth.models import AnonymousUser, Group, Permissionfrom django.core.files import Filediff --git a/tests/dashboard/test_permissions.py b/tests/dashboard/test_permissions.pyindex 915a6a3f25..068bee8541 100644--- a/tests/dashboard/test_permissions.py+++ b/tests/dashboard/test_permissions.py@@ -175,6 +175,24 @@ def test_staff_cant_view_products_attribute_delete(assert response.status_code == 302+def test_admin_can_view_product_image_update(admin_client, product_with_image):+ product_image = product_with_image.images.all()[0]+ url = reverse('dashboard:product-image-update',+ kwargs={'img_pk': product_image.pk,+ 'product_pk': product_with_image.pk})+ response = admin_client.get(url)+ assert response.status_code == 200+++def test_staff_cant_view_product_image_update(staff_client, product_with_image):+ product_image = product_with_image.images.all()[0]+ url = reverse('dashboard:product-image-update',+ kwargs={'img_pk': product_image.pk,+ 'product_pk': product_with_image.pk})+ response = staff_client.get(url)+ assert response.status_code == 302++def test_admin_can_view_shipping_methods_list(admin_client):response = admin_client.get(reverse('dashboard:shipping-methods'))assert response.status_code == 200