Explorar o código

Fix DeviceTypeTestCase permissions assignment for custom tests

Jeremy Stretch %!s(int64=6) %!d(string=hai) anos
pai
achega
3668aa21fe
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      netbox/dcim/tests/test_views.py

+ 2 - 0
netbox/dcim/tests/test_views.py

@@ -371,6 +371,7 @@ device-bays:
 
         # Add all required permissions to the test user
         self.add_permissions(
+            'dcim.view_devicetype',
             'dcim.add_devicetype',
             'dcim.add_consoleporttemplate',
             'dcim.add_consoleserverporttemplate',
@@ -437,6 +438,7 @@ device-bays:
     def test_devicetype_export(self):
 
         url = reverse('dcim:devicetype_list')
+        self.add_permissions('dcim.view_devicetype')
 
         response = self.client.get('{}?export'.format(url))
         self.assertEqual(response.status_code, 200)