mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
cover another missing setting
This commit is contained in:
parent
afada6b759
commit
bf7af8f72a
@ -176,7 +176,13 @@ class APICallMixinTest(BaseMixinDefinition, TestCase):
|
|||||||
pass
|
pass
|
||||||
self.mixin_wrong = WrongCLS()
|
self.mixin_wrong = WrongCLS()
|
||||||
|
|
||||||
|
class WrongCLS2(APICallMixin, IntegrationPluginBase):
|
||||||
|
API_URL_SETTING = 'test'
|
||||||
|
self.mixin_wrong2 = WrongCLS2()
|
||||||
|
|
||||||
def test_function(self):
|
def test_function(self):
|
||||||
|
# check init
|
||||||
|
self.assertTrue(self.mixin.has_api_call())
|
||||||
# api_url
|
# api_url
|
||||||
self.assertEqual('https://reqres.in', self.mixin.api_url)
|
self.assertEqual('https://reqres.in', self.mixin.api_url)
|
||||||
|
|
||||||
@ -204,6 +210,10 @@ class APICallMixinTest(BaseMixinDefinition, TestCase):
|
|||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
self.mixin_wrong.has_api_call()
|
self.mixin_wrong.has_api_call()
|
||||||
|
|
||||||
|
# cover wrong token setting
|
||||||
|
with self.assertRaises(ValueError):
|
||||||
|
self.mixin_wrong.has_api_call()
|
||||||
|
|
||||||
|
|
||||||
class IntegrationPluginBaseTests(TestCase):
|
class IntegrationPluginBaseTests(TestCase):
|
||||||
""" Tests for IntegrationPluginBase """
|
""" Tests for IntegrationPluginBase """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user