aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/ci/test_run_tests.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-01-21 01:02:20 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-01-21 14:53:47 +0100
commit2030e14451a072844e750318de0d5efc47d4500c (patch)
tree47e79f3244d233d6edbe11e30150185ed12a59e0 /functest/tests/unit/ci/test_run_tests.py
parenta6df43da7ab4de653eecbc9b6380d5fc7ce7bc14 (diff)
Fully test and cover functest/ci/tier_*
It also fixes check_deployment.py and ci unit tests which were wrong when testing exceptions. Now ci modules are rated 10/10 and fully covered. Change-Id: I30dca491b44cc54aa1abc0d0433c00b4dcabfdc4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/ci/test_run_tests.py')
-rw-r--r--functest/tests/unit/ci/test_run_tests.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/functest/tests/unit/ci/test_run_tests.py b/functest/tests/unit/ci/test_run_tests.py
index 93cbfccdf..0db5f2832 100644
--- a/functest/tests/unit/ci/test_run_tests.py
+++ b/functest/tests/unit/ci/test_run_tests.py
@@ -20,12 +20,6 @@ class FakeModule(TestCase):
def run(self):
return TestCase.EX_OK
- def push_to_db(self):
- return TestCase.EX_OK
-
- def is_successful(self):
- return TestCase.EX_OK
-
class RunTestsTesting(unittest.TestCase):
@@ -121,9 +115,9 @@ class RunTestsTesting(unittest.TestCase):
mock.patch('functest.ci.run_tests.Runner.get_run_dict',
return_value=None), \
self.assertRaises(Exception) as context:
- self.runner(mock_test, 'tier_name')
- msg = "Cannot import the class for the test case."
- self.assertTrue(msg in context)
+ self.runner.run_test(mock_test)
+ msg = "Cannot import the class for the test case."
+ self.assertTrue(msg in str(context.exception))
@mock.patch('functest.ci.run_tests.Runner.source_rc_file')
@mock.patch('importlib.import_module', name="module",