mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-11 09:48:50 +00:00
remove setup helper as it is not needed anymore
This commit is contained in:
parent
5272b56d04
commit
367c37bbaf
@ -3,10 +3,6 @@
|
|||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
|
|
||||||
from InvenTree.helpers import setup_plugin
|
|
||||||
|
|
||||||
from plugin.samples.integration.sample import SampleIntegrationPlugin
|
|
||||||
|
|
||||||
|
|
||||||
class SampleIntegrationPluginTests(TestCase):
|
class SampleIntegrationPluginTests(TestCase):
|
||||||
""" Tests for SampleIntegrationPlugin """
|
""" Tests for SampleIntegrationPlugin """
|
||||||
@ -17,7 +13,6 @@ class SampleIntegrationPluginTests(TestCase):
|
|||||||
user.objects.create_user('testuser', 'test@testing.com', 'password')
|
user.objects.create_user('testuser', 'test@testing.com', 'password')
|
||||||
|
|
||||||
self.client.login(username='testuser', password='password')
|
self.client.login(username='testuser', password='password')
|
||||||
setup_plugin(SampleIntegrationPlugin.PLUGIN_SLUG, SampleIntegrationPlugin.PLUGIN_NAME)
|
|
||||||
|
|
||||||
def test_view(self):
|
def test_view(self):
|
||||||
"""check the function of the custom sample plugin """
|
"""check the function of the custom sample plugin """
|
||||||
|
@ -7,9 +7,7 @@ from django.contrib.auth import get_user_model
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from InvenTree.helpers import setup_plugin
|
|
||||||
from plugin.integration import AppMixin, IntegrationPluginBase, SettingsMixin, UrlsMixin, NavigationMixin
|
from plugin.integration import AppMixin, IntegrationPluginBase, SettingsMixin, UrlsMixin, NavigationMixin
|
||||||
from plugin.samples.integration.sample import SampleIntegrationPlugin
|
|
||||||
|
|
||||||
|
|
||||||
class BaseMixinDefinition:
|
class BaseMixinDefinition:
|
||||||
@ -112,8 +110,6 @@ class AppMixinTest(BaseMixinDefinition, TestCase):
|
|||||||
pass
|
pass
|
||||||
self.mixin = TestCls()
|
self.mixin = TestCls()
|
||||||
|
|
||||||
setup_plugin(SampleIntegrationPlugin.PLUGIN_SLUG, SampleIntegrationPlugin.PLUGIN_NAME)
|
|
||||||
|
|
||||||
def test_function(self):
|
def test_function(self):
|
||||||
# test that this plugin is in settings
|
# test that this plugin is in settings
|
||||||
self.assertIn('plugin.samples.integration', settings.INSTALLED_APPS)
|
self.assertIn('plugin.samples.integration', settings.INSTALLED_APPS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user