From 442341de50f92a86b5a798dfacf034d0c12b10c9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 15 May 2022 02:39:55 +0200 Subject: [PATCH] split into more tests --- InvenTree/plugin/base/integration/test_mixins.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/InvenTree/plugin/base/integration/test_mixins.py b/InvenTree/plugin/base/integration/test_mixins.py index 4ce4455706..dbe96c928f 100644 --- a/InvenTree/plugin/base/integration/test_mixins.py +++ b/InvenTree/plugin/base/integration/test_mixins.py @@ -178,7 +178,8 @@ class APICallMixinTest(BaseMixinDefinition, TestCase): API_URL_SETTING = 'test' self.mixin_wrong2 = WrongCLS2() - def test_function(self): + def test_base_setup(self): + """Test that the base settings work""" # check init self.assertTrue(self.mixin.has_api_call) # api_url @@ -188,6 +189,8 @@ class APICallMixinTest(BaseMixinDefinition, TestCase): headers = self.mixin.api_headers self.assertEqual(headers, {'Bearer': '', 'Content-Type': 'application/json'}) + def test_args(self): + """Test that building up args work""" # api_build_url_args # 1 arg result = self.mixin.api_build_url_args({'a': 'b'}) @@ -199,6 +202,8 @@ class APICallMixinTest(BaseMixinDefinition, TestCase): result = self.mixin.api_build_url_args({'a': 'b', 'c': ['d', 'e', 'f', ]}) self.assertEqual(result, '?a=b&c=d,e,f') + def test_function(self): + """Test that api calls work""" # api_call result = self.mixin.get_external_url() self.assertTrue(result)