fix mixin test

This commit is contained in:
Matthias 2021-10-05 00:56:33 +02:00
parent bc0ee2a235
commit 9f558d0f69
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -4,7 +4,7 @@ from django.test import TestCase
from django.conf import settings from django.conf import settings
from django.conf.urls import url, include from django.conf.urls import url, include
from plugins.integration import IntegrationPluginBase, SettingsMixin, UrlsMixin, NavigationMixin from plugins.integration import AppMixin, IntegrationPluginBase, SettingsMixin, UrlsMixin, NavigationMixin
class BaseMixinDefinition: class BaseMixinDefinition:
@ -85,6 +85,11 @@ class AppMixinTest(BaseMixinDefinition, TestCase):
MIXIN_NAME = 'app' MIXIN_NAME = 'app'
MIXIN_ENABLE_CHECK = 'has_app' MIXIN_ENABLE_CHECK = 'has_app'
def setUp(self):
class TestCls(AppMixin, IntegrationPluginBase):
pass
self.mixin = TestCls()
def test_function(self): def test_function(self):
# test that this plugin is in settings # test that this plugin is in settings
self.assertIn('plugins.samples.integration', settings.INSTALLED_APPS) self.assertIn('plugins.samples.integration', settings.INSTALLED_APPS)