mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
App Mixin tests
This commit is contained in:
parent
2d5854e1e5
commit
a42bf4983d
@ -4,7 +4,7 @@ from django.test import TestCase
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url, include
|
||||
|
||||
from plugins.integration import IntegrationPluginBase, SettingsMixin, UrlsMixin, NavigationMixin
|
||||
from plugins.integration import IntegrationPluginBase, AppMixin, SettingsMixin, UrlsMixin, NavigationMixin
|
||||
|
||||
|
||||
class BaseMixinDefinition:
|
||||
@ -80,6 +80,16 @@ class UrlsMixinTest(BaseMixinDefinition, TestCase):
|
||||
self.assertIsNone(self.mixin_nothing.urlpatterns)
|
||||
|
||||
|
||||
class AppMixinTest(BaseMixinDefinition, TestCase):
|
||||
MIXIN_HUMAN_NAME = 'App registration'
|
||||
MIXIN_NAME = 'app'
|
||||
MIXIN_ENABLE_CHECK = 'has_app'
|
||||
|
||||
def test_function(self):
|
||||
# test that this plugin is in settings
|
||||
self.assertIn('plugin.sample', settings.INSTALLED_APPS)
|
||||
|
||||
|
||||
class NavigationMixinTest(BaseMixinDefinition, TestCase):
|
||||
MIXIN_HUMAN_NAME = 'Navigation Links'
|
||||
MIXIN_NAME = 'navigation'
|
||||
|
Loading…
Reference in New Issue
Block a user