Stop testing mock functionality
There's no particular reason for us to be verifying mock's behavior. They have their own unit tests for doing that. This is specifically a problem right now because mock changed its behavior in 3.0.0 and broke this test: "Issue #36366: Calling stop() on an unstarted or stopped unittest.mock.patch() object will now return None instead of raising RuntimeError, making the method idempotent." Change-Id: I57db9bad15cab343e152615e115e2ba3ac4d87fe Closes-Bug: 1830429
This commit is contained in:
parent
b40f1fc3d4
commit
f8f6b14088
|
@ -126,14 +126,6 @@ class TestManualMock(base.BaseTestCase):
|
|||
self.addCleanup(patcher.stop)
|
||||
super(TestManualMock, self).setUp()
|
||||
self.useFixture(fixtures.MockPatch('fixtures.Timeout'))
|
||||
self.unstopped = mock.patch('os.environ.put')
|
||||
|
||||
def tearDown(self):
|
||||
super(TestManualMock, self).tearDown()
|
||||
self.assertRaises(
|
||||
RuntimeError,
|
||||
self.unstopped.stop,
|
||||
)
|
||||
|
||||
def test_mock_patch_manually(self):
|
||||
# Verify that if a test instance creates its own mock and
|
||||
|
|
Loading…
Reference in New Issue