diff options
author | gecong1973 <ge.cong@zte.com.cn> | 2017-03-09 14:45:42 +0800 |
---|---|---|
committer | gecong1973 <ge.cong@zte.com.cn> | 2017-03-09 14:45:42 +0800 |
commit | dd2ef6f565e44bbb7f9f7bddf5c73cc0f788aab9 (patch) | |
tree | 4faa32e7dfd0d156cb9e8242b786082608bc2846 | |
parent | 998c12a34a857ea63ff09f73f6e9602316bfec64 (diff) | |
download | oslo-concurrency-dd2ef6f565e44bbb7f9f7bddf5c73cc0f788aab9.tar.gz |
Using fixtures.MockPatch instead of mockpatch.Patch
This module has been deprecated in favor of fixtures.MockPatch.
Change-Id: Iee59fa82e727e0575e8b6b6afe042231aa8fa5b8
-rw-r--r-- | oslo_concurrency/tests/unit/test_processutils.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/oslo_concurrency/tests/unit/test_processutils.py b/oslo_concurrency/tests/unit/test_processutils.py index df010a1..33826b2 100644 --- a/oslo_concurrency/tests/unit/test_processutils.py +++ b/oslo_concurrency/tests/unit/test_processutils.py @@ -33,7 +33,6 @@ from oslotest import base as test_base import six from oslo_concurrency import processutils -from oslotest import mockpatch PROCESS_EXECUTION_ERROR_LOGGING_TEST = """#!/bin/bash @@ -284,7 +283,7 @@ grep foo # This test and the one below ensures that when communicate raises # an OSError, we do the right thing(s) def test_exception_on_communicate_error(self): - mock = self.useFixture(mockpatch.Patch( + mock = self.useFixture(fixtures.MockPatch( 'subprocess.Popen.communicate', side_effect=OSError(errno.EAGAIN, 'fake-test'))) @@ -297,7 +296,7 @@ grep foo self.assertEqual(1, mock.mock.call_count) def test_retry_on_communicate_error(self): - mock = self.useFixture(mockpatch.Patch( + mock = self.useFixture(fixtures.MockPatch( 'subprocess.Popen.communicate', side_effect=OSError(errno.EAGAIN, 'fake-test'))) @@ -312,7 +311,7 @@ grep foo def _test_and_check_logging_communicate_errors(self, log_errors=None, attempts=None): - mock = self.useFixture(mockpatch.Patch( + mock = self.useFixture(fixtures.MockPatch( 'subprocess.Popen.communicate', side_effect=OSError(errno.EAGAIN, 'fake-test'))) |