From 740afc884b2af2f068945e7a9963d5e4b66a1a0e Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sat, 30 Nov 2019 10:44:46 +0100 Subject: Postprocess the TestAPI href returned MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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 --- xtesting/tests/unit/core/test_testcase.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xtesting/tests/unit/core/test_testcase.py') diff --git a/xtesting/tests/unit/core/test_testcase.py b/xtesting/tests/unit/core/test_testcase.py index 80e9d8cf..4ecedd9f 100644 --- a/xtesting/tests/unit/core/test_testcase.py +++ b/xtesting/tests/unit/core/test_testcase.py @@ -151,12 +151,13 @@ class TestCaseTesting(unittest.TestCase): self.test.stop_time).strftime('%Y-%m-%d %H:%M:%S'), "version": "master"} + @mock.patch('re.sub') @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) -- cgit 1.2.3-korg