diff options
Diffstat (limited to 'functest/tests/unit/features/test_barometer.py')
-rw-r--r-- | functest/tests/unit/features/test_barometer.py | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/functest/tests/unit/features/test_barometer.py b/functest/tests/unit/features/test_barometer.py index 62f2e0d6..8ca463b2 100644 --- a/functest/tests/unit/features/test_barometer.py +++ b/functest/tests/unit/features/test_barometer.py @@ -19,36 +19,31 @@ from functest.core import testcase sys.modules['baro_tests'] = mock.Mock() # noqa # pylint: disable=wrong-import-position from functest.opnfv_tests.features import barometer -from functest.utils import constants class BarometerTesting(unittest.TestCase): logging.disable(logging.CRITICAL) + _case_name = "barometercollectd" + _project_name = "barometer" + def setUp(self): self.barometer = barometer.BarometerCollectd( - case_name="barometercollectd") + case_name=self._case_name, project_name=self._project_name) def test_init(self): - self.assertEqual(self.barometer.project_name, "barometer") - self.assertEqual(self.barometer.case_name, "barometercollectd") - self.assertEqual( - self.barometer.repo, - constants.CONST.__getattribute__('dir_repo_barometer')) - - @unittest.skip("JIRA: FUNCTEST-777") - def test_execute_ko(self): - # It must be skipped to allow merging + self.assertEqual(self.barometer.project_name, self._project_name) + self.assertEqual(self.barometer.case_name, self._case_name) + + def test_run_ko(self): sys.modules['baro_tests'].collectd.main = mock.Mock(return_value=1) - self.assertEqual(self.barometer.execute(), + self.assertEqual(self.barometer.run(), testcase.TestCase.EX_RUN_ERROR) - @unittest.skip("JIRA: FUNCTEST-777") - def test_execute(self): - # It must be skipped to allow merging + def test_run(self): sys.modules['baro_tests'].collectd.main = mock.Mock(return_value=0) - self.assertEqual(self.barometer.execute(), testcase.TestCase.EX_OK) + self.assertEqual(self.barometer.run(), testcase.TestCase.EX_OK) if __name__ == "__main__": |