diff options
author | 2017-12-19 00:52:21 +0100 | |
---|---|---|
committer | 2017-12-19 00:58:03 +0100 | |
commit | 840e69fde9c86df109e777ec4e31ec1785020176 (patch) | |
tree | a7700cb3c041c42c1e98bb5fe968549d6602ff66 /functest/tests/unit/core/test_testcase.py | |
parent | 8c11fb51544b020bc329129ba9c3503e84182c84 (diff) |
Remove OSGCTestCase
This class is no longer used and must be removed before working on
xtesting.
JIRA: FUNCTEST-887
Change-Id: I3ac1db6ec90d9db301e5461cd79cfcf77291dffc
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/core/test_testcase.py')
-rw-r--r-- | functest/tests/unit/core/test_testcase.py | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/functest/tests/unit/core/test_testcase.py b/functest/tests/unit/core/test_testcase.py index 0a6f0c9f..6fbf62e2 100644 --- a/functest/tests/unit/core/test_testcase.py +++ b/functest/tests/unit/core/test_testcase.py @@ -12,15 +12,17 @@ import logging import unittest +from functest.core import testcase + import mock -from functest.core import testcase __author__ = "Cedric Ollivier <cedric.ollivier@orange.com>" class TestCaseTesting(unittest.TestCase): """The class testing TestCase.""" + # pylint: disable=missing-docstring,too-many-public-methods _case_name = "base" @@ -229,48 +231,6 @@ class TestCaseTesting(unittest.TestCase): self.assertEqual(self.test.clean(), None) -class OSGCTestCaseTesting(unittest.TestCase): - """The class testing OSGCTestCase.""" - # pylint: disable=missing-docstring - - def setUp(self): - self.test = testcase.OSGCTestCase() - - @mock.patch('functest.utils.openstack_snapshot.main', - side_effect=Exception) - def test_create_snapshot_exc(self, mock_method=None): - self.assertEqual(self.test.create_snapshot(), - testcase.TestCase.EX_RUN_ERROR) - mock_method.assert_called_once_with() - - @mock.patch('functest.utils.openstack_snapshot.main', return_value=-1) - def test_create_snapshot_ko(self, mock_method=None): - self.assertEqual(self.test.create_snapshot(), - testcase.TestCase.EX_RUN_ERROR) - mock_method.assert_called_once_with() - - @mock.patch('functest.utils.openstack_snapshot.main', return_value=0) - def test_create_snapshot_env(self, mock_method=None): - self.assertEqual(self.test.create_snapshot(), - testcase.TestCase.EX_OK) - mock_method.assert_called_once_with() - - @mock.patch('functest.utils.openstack_clean.main', side_effect=Exception) - def test_clean_exc(self, mock_method=None): - self.assertEqual(self.test.clean(), None) - mock_method.assert_called_once_with() - - @mock.patch('functest.utils.openstack_clean.main', return_value=-1) - def test_clean_ko(self, mock_method=None): - self.assertEqual(self.test.clean(), None) - mock_method.assert_called_once_with() - - @mock.patch('functest.utils.openstack_clean.main', return_value=0) - def test_clean(self, mock_method=None): - self.assertEqual(self.test.clean(), None) - mock_method.assert_called_once_with() - - if __name__ == "__main__": logging.disable(logging.CRITICAL) unittest.main(verbosity=2) |