Dont test context manager in server mode.
This commit is contained in:
parent
b19c201975
commit
c2e382f537
1 changed files with 4 additions and 2 deletions
|
|
@ -1,10 +1,12 @@
|
|||
import sure # noqa
|
||||
import boto3
|
||||
from moto import mock_sqs
|
||||
from moto import mock_sqs, settings
|
||||
|
||||
|
||||
def test_context_manager_returns_mock():
|
||||
with mock_sqs() as sqs_mock:
|
||||
conn = boto3.client("sqs", region_name='us-west-1')
|
||||
conn.create_queue(QueueName="queue1")
|
||||
|
||||
list(sqs_mock.backends['us-west-1'].queues.keys()).should.equal(['queue1'])
|
||||
if not settings.TEST_SERVER_MODE:
|
||||
list(sqs_mock.backends['us-west-1'].queues.keys()).should.equal(['queue1'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue