added test for wrong config

This commit is contained in:
Matthias 2022-01-09 22:33:14 +01:00
parent e889f487f0
commit c8599039a2
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -171,6 +171,11 @@ class APICallMixinTest(BaseMixinDefinition, TestCase):
'''
return self.api_call('api/users/2')
self.mixin = MixinCls()
class WrongCLS(APICallMixin, IntegrationPluginBase):
pass
self.mixin_nothing = WrongCLS()
def test_function(self):
# api_url
self.assertEqual('https://reqres.in', self.mixin.api_url)
@ -185,6 +190,10 @@ class APICallMixinTest(BaseMixinDefinition, TestCase):
self.assertTrue(result)
self.assertIn('data', result,)
# wrongly defined plugins should not load
with self.assertRaises(ValueError):
self.mixin_nothing.has_api_call()
class IntegrationPluginBaseTests(TestCase):
""" Tests for IntegrationPluginBase """