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