1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
import pytest
@pytest.mark.moto
@pytest.mark.asyncio
async def test_sqs(cloudformation_client):
cloudformation_template = """{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"queue1": {
"Type": "AWS::SQS::Queue",
"Properties": {
"QueueName": "my-queue"
}
}
}
}"""
# Create stack
resp = await cloudformation_client.create_stack(
StackName='my-stack', TemplateBody=cloudformation_template
)
assert resp['ResponseMetadata']['HTTPStatusCode'] == 200
# wait for complete
waiter = cloudformation_client.get_waiter('stack_create_complete')
await waiter.wait(StackName='my-stack')
|