aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/tests/unit/core/test_testcase.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-11-30 10:44:46 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2019-11-30 13:48:04 +0100
commit3fbd1085b8fe00e05b4bd71f0e27798242d3e159 (patch)
tree889ef948fd808667a439513f685c65efddf3b044 /xtesting/tests/unit/core/test_testcase.py
parent060b3380f8884507c86b054da009e332b737d118 (diff)
Postprocess the TestAPI href returned
[1] returned http://localhost:8082 [1] https://build.opnfv.org/ci/job/airship-opnfv-functest-healthcheck-latest-connection_check-run/58/console Change-Id: Ifc0e37a97442193a77762ecc2928b100e27028cd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 740afc884b2af2f068945e7a9963d5e4b66a1a0e)
Diffstat (limited to 'xtesting/tests/unit/core/test_testcase.py')
-rw-r--r--xtesting/tests/unit/core/test_testcase.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/xtesting/tests/unit/core/test_testcase.py b/xtesting/tests/unit/core/test_testcase.py
index 80e9d8cf..f3b2d512 100644
--- a/xtesting/tests/unit/core/test_testcase.py
+++ b/xtesting/tests/unit/core/test_testcase.py
@@ -151,12 +151,14 @@ class TestCaseTesting(unittest.TestCase):
self.test.stop_time).strftime('%Y-%m-%d %H:%M:%S'),
"version": "master"}
+ @mock.patch('os.path.join', return_value='')
+ @mock.patch('re.sub', return_value='')
@mock.patch('requests.post')
- def _test_pushdb_version(self, mock_function=None, **kwargs):
+ def _test_pushdb_version(self, *args, **kwargs):
payload = self._get_data()
payload["version"] = kwargs.get("version", "unknown")
self.assertEqual(self.test.push_to_db(), testcase.TestCase.EX_OK)
- mock_function.assert_called_once_with(
+ args[0].assert_called_once_with(
os.environ['TEST_DB_URL'],
data=json.dumps(payload, sort_keys=True),
headers=self._headers)