Merge branch 'master' into feature/2546
This commit is contained in:
commit
5f6e8fd6fe
18 changed files with 62 additions and 57 deletions
|
|
@ -1003,10 +1003,10 @@ def test_list_versions_by_function_for_nonexistent_function():
|
|||
@mock_lambda
|
||||
@mock_sqs
|
||||
def test_create_event_source_mapping():
|
||||
sqs = boto3.resource("sqs")
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
queue = sqs.create_queue(QueueName="test-sqs-queue1")
|
||||
|
||||
conn = boto3.client("lambda")
|
||||
conn = boto3.client("lambda", region_name="us-east-1")
|
||||
func = conn.create_function(
|
||||
FunctionName="testFunction",
|
||||
Runtime="python2.7",
|
||||
|
|
@ -1032,11 +1032,11 @@ def test_create_event_source_mapping():
|
|||
@mock_lambda
|
||||
@mock_sqs
|
||||
def test_invoke_function_from_sqs():
|
||||
logs_conn = boto3.client("logs")
|
||||
sqs = boto3.resource("sqs")
|
||||
logs_conn = boto3.client("logs", region_name="us-east-1")
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
queue = sqs.create_queue(QueueName="test-sqs-queue1")
|
||||
|
||||
conn = boto3.client("lambda")
|
||||
conn = boto3.client("lambda", region_name="us-east-1")
|
||||
func = conn.create_function(
|
||||
FunctionName="testFunction",
|
||||
Runtime="python2.7",
|
||||
|
|
@ -1056,7 +1056,7 @@ def test_invoke_function_from_sqs():
|
|||
assert response["EventSourceArn"] == queue.attributes["QueueArn"]
|
||||
assert response["State"] == "Enabled"
|
||||
|
||||
sqs_client = boto3.client("sqs")
|
||||
sqs_client = boto3.client("sqs", region_name="us-east-1")
|
||||
sqs_client.send_message(QueueUrl=queue.url, MessageBody="test")
|
||||
start = time.time()
|
||||
while (time.time() - start) < 30:
|
||||
|
|
@ -1083,8 +1083,8 @@ def test_invoke_function_from_sqs():
|
|||
@mock_lambda
|
||||
@mock_dynamodb2
|
||||
def test_invoke_function_from_dynamodb():
|
||||
logs_conn = boto3.client("logs")
|
||||
dynamodb = boto3.client("dynamodb")
|
||||
logs_conn = boto3.client("logs", region_name="us-east-1")
|
||||
dynamodb = boto3.client("dynamodb", region_name="us-east-1")
|
||||
table_name = "table_with_stream"
|
||||
table = dynamodb.create_table(
|
||||
TableName=table_name,
|
||||
|
|
@ -1096,7 +1096,7 @@ def test_invoke_function_from_dynamodb():
|
|||
},
|
||||
)
|
||||
|
||||
conn = boto3.client("lambda")
|
||||
conn = boto3.client("lambda", region_name="us-east-1")
|
||||
func = conn.create_function(
|
||||
FunctionName="testFunction",
|
||||
Runtime="python2.7",
|
||||
|
|
@ -1143,11 +1143,11 @@ def test_invoke_function_from_dynamodb():
|
|||
@mock_lambda
|
||||
@mock_sqs
|
||||
def test_invoke_function_from_sqs_exception():
|
||||
logs_conn = boto3.client("logs")
|
||||
sqs = boto3.resource("sqs")
|
||||
logs_conn = boto3.client("logs", region_name="us-east-1")
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
queue = sqs.create_queue(QueueName="test-sqs-queue1")
|
||||
|
||||
conn = boto3.client("lambda")
|
||||
conn = boto3.client("lambda", region_name="us-east-1")
|
||||
func = conn.create_function(
|
||||
FunctionName="testFunction",
|
||||
Runtime="python2.7",
|
||||
|
|
@ -1203,10 +1203,10 @@ def test_invoke_function_from_sqs_exception():
|
|||
@mock_lambda
|
||||
@mock_sqs
|
||||
def test_list_event_source_mappings():
|
||||
sqs = boto3.resource("sqs")
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
queue = sqs.create_queue(QueueName="test-sqs-queue1")
|
||||
|
||||
conn = boto3.client("lambda")
|
||||
conn = boto3.client("lambda", region_name="us-east-1")
|
||||
func = conn.create_function(
|
||||
FunctionName="testFunction",
|
||||
Runtime="python2.7",
|
||||
|
|
@ -1235,10 +1235,10 @@ def test_list_event_source_mappings():
|
|||
@mock_lambda
|
||||
@mock_sqs
|
||||
def test_get_event_source_mapping():
|
||||
sqs = boto3.resource("sqs")
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
queue = sqs.create_queue(QueueName="test-sqs-queue1")
|
||||
|
||||
conn = boto3.client("lambda")
|
||||
conn = boto3.client("lambda", region_name="us-east-1")
|
||||
func = conn.create_function(
|
||||
FunctionName="testFunction",
|
||||
Runtime="python2.7",
|
||||
|
|
@ -1265,10 +1265,10 @@ def test_get_event_source_mapping():
|
|||
@mock_lambda
|
||||
@mock_sqs
|
||||
def test_update_event_source_mapping():
|
||||
sqs = boto3.resource("sqs")
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
queue = sqs.create_queue(QueueName="test-sqs-queue1")
|
||||
|
||||
conn = boto3.client("lambda")
|
||||
conn = boto3.client("lambda", region_name="us-east-1")
|
||||
func1 = conn.create_function(
|
||||
FunctionName="testFunction",
|
||||
Runtime="python2.7",
|
||||
|
|
@ -1309,10 +1309,10 @@ def test_update_event_source_mapping():
|
|||
@mock_lambda
|
||||
@mock_sqs
|
||||
def test_delete_event_source_mapping():
|
||||
sqs = boto3.resource("sqs")
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
queue = sqs.create_queue(QueueName="test-sqs-queue1")
|
||||
|
||||
conn = boto3.client("lambda")
|
||||
conn = boto3.client("lambda", region_name="us-east-1")
|
||||
func1 = conn.create_function(
|
||||
FunctionName="testFunction",
|
||||
Runtime="python2.7",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue