Explorar o código

Fix the initial permissions check on create/edit view tests

Jeremy Stretch %!s(int64=5) %!d(string=hai) anos
pai
achega
04571ce920
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      netbox/utilities/testing/views.py

+ 2 - 2
netbox/utilities/testing/views.py

@@ -275,7 +275,7 @@ class ViewTestCases:
 
             # Try GET without permission
             with disable_warnings('django.request'):
-                self.assertHttpStatus(self.client.post(self._get_url('add')), 403)
+                self.assertHttpStatus(self.client.get(self._get_url('add')), 403)
 
             # Try POST without permission
             request = {
@@ -360,7 +360,7 @@ class ViewTestCases:
 
             # Try GET without permission
             with disable_warnings('django.request'):
-                self.assertHttpStatus(self.client.post(self._get_url('edit', instance)), 403)
+                self.assertHttpStatus(self.client.get(self._get_url('edit', instance)), 403)
 
             # Try POST without permission
             request = {