From c2e382f537b87cdc898924eeea2ef66a2d4f1741 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Wed, 10 Jul 2019 21:40:49 -0500 Subject: [PATCH] Dont test context manager in server mode. --- tests/test_core/test_context_manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_core/test_context_manager.py b/tests/test_core/test_context_manager.py index 96d2bec9a..4824e021f 100644 --- a/tests/test_core/test_context_manager.py +++ b/tests/test_core/test_context_manager.py @@ -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'])