Mock os.path.join in push_to_db 07/69207/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Sat, 30 Nov 2019 12:08:20 +0000 (13:08 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 30 Nov 2019 12:50:38 +0000 (13:50 +0100)
Change-Id: I8d0c8f9ef4688454a6d2992ab1a20d871814e23f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 6d83c09a0608c95993060bacc9e4447d6bdbc590)

xtesting/tests/unit/core/test_testcase.py
xtesting/tests/unit/utils/test_decorators.py

index 4ecedd9..f3b2d51 100644 (file)
@@ -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()
index 25acd68..2810df1 100644 (file)
@@ -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):