mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
Update errors
This commit is contained in:
parent
897dd115f9
commit
dcbd9d906b
@ -8,6 +8,7 @@ from django.contrib.auth import get_user_model
|
|||||||
from plugin import InvenTreePlugin
|
from plugin import InvenTreePlugin
|
||||||
from plugin.mixins import AppMixin, SettingsMixin, UrlsMixin, NavigationMixin, APICallMixin
|
from plugin.mixins import AppMixin, SettingsMixin, UrlsMixin, NavigationMixin, APICallMixin
|
||||||
from plugin.urls import PLUGIN_BASE
|
from plugin.urls import PLUGIN_BASE
|
||||||
|
from plugin.helpers import MixinNotImplementedError
|
||||||
|
|
||||||
|
|
||||||
class BaseMixinDefinition:
|
class BaseMixinDefinition:
|
||||||
@ -237,9 +238,9 @@ class APICallMixinTest(BaseMixinDefinition, TestCase):
|
|||||||
def test_function_errors(self):
|
def test_function_errors(self):
|
||||||
"""Test function errors"""
|
"""Test function errors"""
|
||||||
# wrongly defined plugins should not load
|
# wrongly defined plugins should not load
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(MixinNotImplementedError):
|
||||||
self.mixin_wrong.has_api_call()
|
self.mixin_wrong.has_api_call()
|
||||||
|
|
||||||
# cover wrong token setting
|
# cover wrong token setting
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(MixinNotImplementedError):
|
||||||
self.mixin_wrong2.has_api_call()
|
self.mixin_wrong2.has_api_call()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user