diff options
author | valentin boucher <valentin.boucher@orange.com> | 2017-05-24 09:20:18 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-24 09:20:18 +0000 |
commit | 91457229e601b7f39b3a73d5db9f92397c1c8315 (patch) | |
tree | fa3145b98c3432cc640207fc903bbcb7af715f03 /functest | |
parent | 87570cfe1261917a41a3aef287ecd30b928e841f (diff) | |
parent | dbedb36db63b406c5264be20e100062fc59c5a19 (diff) |
Merge "Rename pytest_suite_runner.py to unit.py"
Diffstat (limited to 'functest')
-rw-r--r-- | functest/core/unit.py (renamed from functest/core/pytest_suite_runner.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/snaps/snaps_test_runner.py | 4 | ||||
-rw-r--r-- | functest/tests/unit/core/test_pytest_suite_runner.py | 10 |
3 files changed, 6 insertions, 8 deletions
diff --git a/functest/core/pytest_suite_runner.py b/functest/core/unit.py index efcef7b6..efcef7b6 100644 --- a/functest/core/pytest_suite_runner.py +++ b/functest/core/unit.py diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py index 94b97551..c180df61 100644 --- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py +++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py @@ -7,7 +7,7 @@ import logging -from functest.core.pytest_suite_runner import PyTestSuiteRunner +from functest.core import unit from functest.opnfv_tests.openstack.snaps import snaps_utils from functest.utils import functest_utils from functest.utils.constants import CONST @@ -16,7 +16,7 @@ from snaps.openstack import create_flavor from snaps.openstack.tests import openstack_tests -class SnapsTestRunner(PyTestSuiteRunner): +class SnapsTestRunner(unit.PyTestSuiteRunner): """ This test executes the SNAPS Python Tests """ diff --git a/functest/tests/unit/core/test_pytest_suite_runner.py b/functest/tests/unit/core/test_pytest_suite_runner.py index f317cdea..c11d8853 100644 --- a/functest/tests/unit/core/test_pytest_suite_runner.py +++ b/functest/tests/unit/core/test_pytest_suite_runner.py @@ -12,20 +12,19 @@ import unittest import mock -from functest.core import pytest_suite_runner +from functest.core import unit from functest.core import testcase class PyTestSuiteRunnerTesting(unittest.TestCase): def setUp(self): - self.psrunner = pytest_suite_runner.PyTestSuiteRunner() + self.psrunner = unit.PyTestSuiteRunner() @mock.patch('unittest.TestLoader') def _test_run(self, mock_class=None, result=mock.Mock(), status=testcase.TestCase.EX_OK): - with mock.patch('functest.core.pytest_suite_runner.' - 'unittest.TextTestRunner.run', + with mock.patch('functest.core.unit.unittest.TextTestRunner.run', return_value=result): self.assertEqual(self.psrunner.run(), status) mock_class.assert_not_called() @@ -78,8 +77,7 @@ class PyTestSuiteRunnerTesting(unittest.TestCase): failures=[]) mock_obj = mock.Mock() mock_class.side_effect = mock_obj - with mock.patch('functest.core.pytest_suite_runner.' - 'unittest.TextTestRunner.run', + with mock.patch('functest.core.unit.unittest.TextTestRunner.run', return_value=mock_result): self.assertEqual(self.psrunner.run(name='foo'), testcase.TestCase.EX_OK) |