From dbedb36db63b406c5264be20e100062fc59c5a19 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 23 May 2017 16:37:04 +0200 Subject: Rename pytest_suite_runner.py to unit.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It also adds the rst files to include this module in apidoc. Change-Id: Iabbb17bc8601265bd9436c75d1afc0b470df1eb4 Signed-off-by: Cédric Ollivier --- functest/tests/unit/core/test_pytest_suite_runner.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'functest/tests/unit/core') 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) -- cgit 1.2.3-korg