Jeremy Stretch 5 лет назад
Родитель
Сommit
ee4c5ef64a

+ 1 - 1
netbox/extras/tests/dummy_plugin/api/serializers.py

@@ -6,4 +6,4 @@ class DummySerializer(ModelSerializer):
 
     class Meta:
         model = DummyModel
-        fields = ('id', 'name', 'sound')
+        fields = ('id', 'name', 'number')

+ 2 - 1
netbox/extras/tests/test_plugins.py

@@ -1,5 +1,5 @@
 from django.conf import settings
-from django.test import Client, TestCase
+from django.test import Client, TestCase, override_settings
 from django.urls import reverse
 
 from extras.registry import registry
@@ -41,6 +41,7 @@ class PluginTest(TestCase):
         response = client.get(url)
         self.assertEqual(response.status_code, 200)
 
+    @override_settings(EXEMPT_VIEW_PERMISSIONS=['*'])
     def test_api_views(self):
 
         # Test URL resolution

+ 1 - 1
netbox/netbox/configuration.testing.py

@@ -15,7 +15,7 @@ DATABASE = {
 }
 
 PLUGINS = [
-    'extras.tests.dummy_plugin'
+    'extras.tests.dummy_plugin',
 ]
 
 REDIS = {