mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add test for is_sample
This commit is contained in:
parent
096c0c876c
commit
1522d330fa
@ -11,6 +11,8 @@ from plugin import IntegrationPluginBase
|
||||
from plugin.mixins import AppMixin, SettingsMixin, UrlsMixin, NavigationMixin, APICallMixin
|
||||
from plugin.urls import PLUGIN_BASE
|
||||
|
||||
from plugin.samples.integration.sample import SampleIntegrationPlugin
|
||||
|
||||
|
||||
class BaseMixinDefinition:
|
||||
def test_mixin_name(self):
|
||||
@ -238,6 +240,7 @@ class IntegrationPluginBaseTests(TestCase):
|
||||
LICENSE = 'MIT'
|
||||
|
||||
self.plugin_name = NameIntegrationPluginBase()
|
||||
self.plugin_sample = SampleIntegrationPlugin()
|
||||
|
||||
def test_action_name(self):
|
||||
"""check the name definition possibilities"""
|
||||
@ -246,6 +249,10 @@ class IntegrationPluginBaseTests(TestCase):
|
||||
self.assertEqual(self.plugin_simple.plugin_name(), 'SimplePlugin')
|
||||
self.assertEqual(self.plugin_name.plugin_name(), 'Aplugin')
|
||||
|
||||
# is_sampe
|
||||
self.assertEqual(self.plugin.is_sample, False)
|
||||
self.assertEqual(self.plugin_sample.is_sample, True)
|
||||
|
||||
# slug
|
||||
self.assertEqual(self.plugin.slug, '')
|
||||
self.assertEqual(self.plugin_simple.slug, 'simpleplugin')
|
||||
|
Loading…
Reference in New Issue
Block a user