Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add test for product attribute deletion view in dashboard
Jakub Draganek00f2887b7b74
diff --git a/tests/dashboard/test_product.py b/tests/dashboard/test_product.pyindex 60e8ed2479..77b291f48f 100644--- a/tests/dashboard/test_product.py+++ b/tests/dashboard/test_product.py@@ -248,3 +248,11 @@ def test_view_attribute_not_deleted_before_confirmation(admin_client, color_attrresponse = admin_client.get(url)assert response.status_code == HTTP_STATUS_OKassert ProductAttribute.objects.filter(pk=color_attribute.pk)+++def test_view_attribute_delete(admin_client, color_attribute):+ url = reverse('dashboard:product-attribute-delete',+ kwargs={'pk':color_attribute.pk})+ response = admin_client.post(url)+ assert response.status_code == HTTP_REDIRECTION+ assert not ProductAttribute.objects.filter(pk=color_attribute.pk)