Merge pull request #680 from SplunkStorm/setup_s3_cfn_parsing
Setup s3 cfn parsing
This commit is contained in:
commit
e92a8b7492
4 changed files with 25 additions and 3 deletions
|
|
@ -7,6 +7,7 @@ import sure # noqa
|
|||
from moto.cloudformation.models import FakeStack
|
||||
from moto.cloudformation.parsing import resource_class_from_type, parse_condition
|
||||
from moto.sqs.models import Queue
|
||||
from moto.s3.models import FakeBucket
|
||||
from boto.cloudformation.stack import Output
|
||||
from boto.exception import BotoServerError
|
||||
|
||||
|
|
@ -23,6 +24,10 @@ dummy_template = {
|
|||
"VisibilityTimeout": 60,
|
||||
}
|
||||
},
|
||||
"S3Bucket": {
|
||||
"Type": "AWS::S3::Bucket",
|
||||
"DeletionPolicy": "Retain"
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -85,12 +90,16 @@ def test_parse_stack_resources():
|
|||
parameters={},
|
||||
region_name='us-west-1')
|
||||
|
||||
stack.resource_map.should.have.length_of(1)
|
||||
list(stack.resource_map.keys())[0].should.equal('Queue')
|
||||
queue = list(stack.resource_map.values())[0]
|
||||
stack.resource_map.should.have.length_of(2)
|
||||
|
||||
queue = stack.resource_map['Queue']
|
||||
queue.should.be.a(Queue)
|
||||
queue.name.should.equal("my-queue")
|
||||
|
||||
bucket = stack.resource_map['S3Bucket']
|
||||
bucket.should.be.a(FakeBucket)
|
||||
bucket.physical_resource_id.should.equal(bucket.name)
|
||||
|
||||
|
||||
@patch("moto.cloudformation.parsing.logger")
|
||||
def test_missing_resource_logs(logger):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue