Py3: use unittest.mock instead of mock (#3481)
* Py3: use unittest.mock instead of mock * noqa * oops * just pull in patch() * ignore RuntimeError when stopping patch * ignore RuntimeError from default_session_mock.stop()
This commit is contained in:
parent
9fa7613c4d
commit
3af87963d1
8 changed files with 36 additions and 15 deletions
|
|
@ -36,7 +36,10 @@ class TestCore:
|
|||
self.stream_arn = None
|
||||
|
||||
for m in self.mocks:
|
||||
m.stop()
|
||||
try:
|
||||
m.stop()
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
def test_verify_stream(self):
|
||||
conn = boto3.client("dynamodb", region_name="us-east-1")
|
||||
|
|
@ -200,7 +203,10 @@ class TestEdges:
|
|||
|
||||
def teardown(self):
|
||||
for m in self.mocks:
|
||||
m.stop()
|
||||
try:
|
||||
m.stop()
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
def test_enable_stream_on_table(self):
|
||||
conn = boto3.client("dynamodb", region_name="us-east-1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue