diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-11-30 13:08:20 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-11-30 13:50:38 +0100 |
commit | c08c84588f5a46d14165e781417175962aa73ee4 (patch) | |
tree | 0428a91eb974977b9a363ae0adb66e2358ed4d80 /xtesting/tests/unit | |
parent | 148956f1aaf435fe9d0b486d43ef4fb18032fd81 (diff) |
Mock os.path.join in push_to_db
Change-Id: I8d0c8f9ef4688454a6d2992ab1a20d871814e23f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 6d83c09a0608c95993060bacc9e4447d6bdbc590)
Diffstat (limited to 'xtesting/tests/unit')
-rw-r--r-- | xtesting/tests/unit/core/test_testcase.py | 3 | ||||
-rw-r--r-- | xtesting/tests/unit/utils/test_decorators.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/xtesting/tests/unit/core/test_testcase.py b/xtesting/tests/unit/core/test_testcase.py index 4ecedd9f..f3b2d512 100644 --- a/xtesting/tests/unit/core/test_testcase.py +++ b/xtesting/tests/unit/core/test_testcase.py @@ -151,7 +151,8 @@ class TestCaseTesting(unittest.TestCase): self.test.stop_time).strftime('%Y-%m-%d %H:%M:%S'), "version": "master"} - @mock.patch('re.sub') + @mock.patch('os.path.join', return_value='') + @mock.patch('re.sub', return_value='') @mock.patch('requests.post') def _test_pushdb_version(self, *args, **kwargs): payload = self._get_data() diff --git a/xtesting/tests/unit/utils/test_decorators.py b/xtesting/tests/unit/utils/test_decorators.py index 25acd68c..2810df15 100644 --- a/xtesting/tests/unit/utils/test_decorators.py +++ b/xtesting/tests/unit/utils/test_decorators.py @@ -85,6 +85,7 @@ class DecoratorsTesting(unittest.TestCase): test = self._get_testcase() self.assertEqual(test.run(), testcase.TestCase.EX_OK) + @mock.patch('os.path.join') @mock.patch('re.sub') @mock.patch('requests.post') def test_http_shema(self, *args): |