summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Nemec <bnemec@redhat.com>2019-05-28 17:04:19 +0000
committerDirk Mueller <dirk@dmllr.de>2019-07-24 13:37:23 +0000
commit9e46577ab812cd4657b6ca276f0061c1851d2925 (patch)
tree0a4e6ba09cf6a2b37d333abf8d92895c035a586c
parent4f161691532522762a788a05c8c196d68c6fa907 (diff)
downloadoslotest-stable/stein.tar.gz
Stop testing mock functionalitystein-em3.7.2stable/stein
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 (cherry picked from commit f8f6b14088637fd87de7cf385b840d6b5e5f9b22)
-rw-r--r--oslotest/tests/unit/test_base.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/oslotest/tests/unit/test_base.py b/oslotest/tests/unit/test_base.py
index 93c3c52..b98c672 100644
--- a/oslotest/tests/unit/test_base.py
+++ b/oslotest/tests/unit/test_base.py
@@ -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