Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add test for stock location delete view in dashboard
Jakub Draganek622044c41999
diff --git a/tests/dashboard/test_product.py b/tests/dashboard/test_product.pyindex 910286fd36..ff3a46aa0c 100644--- a/tests/dashboard/test_product.py+++ b/tests/dashboard/test_product.py@@ -233,3 +233,10 @@ def test_view_stock_location_not_deleted_before_confirmation(admin_client, stockassert response.status_code == HTTP_STATUS_OKassert StockLocation.objects.filter(pk=stock_location.pk)++def test_view_stock_location_delete(admin_client, stock_location):+ url = reverse('dashboard:product-stock-location-delete',+ kwargs={'location_pk':stock_location.pk})+ response = admin_client.post(url)+ assert response.status_code == HTTP_REDIRECTION+ assert not StockLocation.objects.filter(pk=stock_location.pk)