Fix Mock 4.0.3 compatibility - Unpatch only once during teardown (#3541)
* #3535 - Unpatch only once during teardown * EnvVar patching - Fix Python2 bug * Allow latest version of mock-library
This commit is contained in:
parent
d8097b24dc
commit
d7b8419791
5 changed files with 83 additions and 8 deletions
18
tests/test_s3/test_s3_classdecorator.py
Normal file
18
tests/test_s3/test_s3_classdecorator.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import unittest
|
||||
|
||||
import boto3
|
||||
from moto import mock_s3
|
||||
|
||||
|
||||
@mock_s3
|
||||
class ClassDecoratorTest(unittest.TestCase):
|
||||
"""
|
||||
https://github.com/spulec/moto/issues/3535
|
||||
An update to the mock-package introduced a failure during teardown.
|
||||
This test is in place to catch any similar failures with our mocking approach
|
||||
"""
|
||||
|
||||
def test_instantiation_succeeds(self):
|
||||
s3 = boto3.client("s3", region_name="us-east-1")
|
||||
|
||||
assert s3 is not None
|
||||
Loading…
Add table
Add a link
Reference in a new issue