mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 13:06:45 +00:00
Merge pull request #2998 from matmair/small-python-fixes-plugin
Small code smell fixes for plugin
This commit is contained in:
commit
43669db783
@ -10,7 +10,7 @@ __all__ = [
|
|||||||
'registry',
|
'registry',
|
||||||
|
|
||||||
'InvenTreePlugin',
|
'InvenTreePlugin',
|
||||||
IntegrationPluginBase,
|
'IntegrationPluginBase',
|
||||||
'MixinNotImplementedError',
|
'MixinNotImplementedError',
|
||||||
'MixinImplementationError',
|
'MixinImplementationError',
|
||||||
]
|
]
|
||||||
|
@ -36,4 +36,4 @@ class LabelPrintingMixin:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Unimplemented (to be implemented by the particular plugin class)
|
# Unimplemented (to be implemented by the particular plugin class)
|
||||||
MixinNotImplementedError('This Plugin must implement a `print_label` method')
|
raise MixinNotImplementedError('This Plugin must implement a `print_label` method')
|
||||||
|
@ -5,5 +5,5 @@ Import helper for events
|
|||||||
from plugin.base.event.events import trigger_event
|
from plugin.base.event.events import trigger_event
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
trigger_event,
|
'trigger_event',
|
||||||
]
|
]
|
||||||
|
@ -87,7 +87,7 @@ class InvenTreePluginTests(TestCase):
|
|||||||
AUTHOR = 'AA BB'
|
AUTHOR = 'AA BB'
|
||||||
DESCRIPTION = 'A description'
|
DESCRIPTION = 'A description'
|
||||||
VERSION = '1.2.3a'
|
VERSION = '1.2.3a'
|
||||||
WEBSITE = 'http://aa.bb/cc'
|
WEBSITE = 'https://aa.bb/cc'
|
||||||
LICENSE = 'MIT'
|
LICENSE = 'MIT'
|
||||||
|
|
||||||
self.plugin_name = NameInvenTreePlugin()
|
self.plugin_name = NameInvenTreePlugin()
|
||||||
@ -147,7 +147,7 @@ class InvenTreePluginTests(TestCase):
|
|||||||
# website
|
# website
|
||||||
self.assertEqual(self.plugin.website, None)
|
self.assertEqual(self.plugin.website, None)
|
||||||
self.assertEqual(self.plugin_simple.website, None)
|
self.assertEqual(self.plugin_simple.website, None)
|
||||||
self.assertEqual(self.plugin_name.website, 'http://aa.bb/cc')
|
self.assertEqual(self.plugin_name.website, 'https://aa.bb/cc')
|
||||||
|
|
||||||
# license
|
# license
|
||||||
self.assertEqual(self.plugin.license, None)
|
self.assertEqual(self.plugin.license, None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user