Merge pull request #2998 from matmair/small-python-fixes-plugin

Small code smell fixes for plugin
This commit is contained in:
Oliver 2022-05-16 07:20:22 +10:00 committed by GitHub
commit 43669db783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ __all__ = [
'registry',
'InvenTreePlugin',
IntegrationPluginBase,
'IntegrationPluginBase',
'MixinNotImplementedError',
'MixinImplementationError',
]

View File

@ -36,4 +36,4 @@ class LabelPrintingMixin:
"""
# 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')

View File

@ -5,5 +5,5 @@ Import helper for events
from plugin.base.event.events import trigger_event
__all__ = [
trigger_event,
'trigger_event',
]

View File

@ -87,7 +87,7 @@ class InvenTreePluginTests(TestCase):
AUTHOR = 'AA BB'
DESCRIPTION = 'A description'
VERSION = '1.2.3a'
WEBSITE = 'http://aa.bb/cc'
WEBSITE = 'https://aa.bb/cc'
LICENSE = 'MIT'
self.plugin_name = NameInvenTreePlugin()
@ -147,7 +147,7 @@ class InvenTreePluginTests(TestCase):
# website
self.assertEqual(self.plugin.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
self.assertEqual(self.plugin.license, None)