From ee4c5ef64a8d84f6d7b5a2ef63674d1364c4ea01 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 2 Apr 2020 15:11:19 -0400 Subject: [PATCH] Fix CI tests --- netbox/extras/tests/dummy_plugin/api/serializers.py | 2 +- netbox/extras/tests/test_plugins.py | 3 ++- netbox/netbox/configuration.testing.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/netbox/extras/tests/dummy_plugin/api/serializers.py b/netbox/extras/tests/dummy_plugin/api/serializers.py index c0f89fd0f..101786168 100644 --- a/netbox/extras/tests/dummy_plugin/api/serializers.py +++ b/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') diff --git a/netbox/extras/tests/test_plugins.py b/netbox/extras/tests/test_plugins.py index 6134fbd82..83a7e33ed 100644 --- a/netbox/extras/tests/test_plugins.py +++ b/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 diff --git a/netbox/netbox/configuration.testing.py b/netbox/netbox/configuration.testing.py index 3cade747f..09d5362ab 100644 --- a/netbox/netbox/configuration.testing.py +++ b/netbox/netbox/configuration.testing.py @@ -15,7 +15,7 @@ DATABASE = { } PLUGINS = [ - 'extras.tests.dummy_plugin' + 'extras.tests.dummy_plugin', ] REDIS = {