"AWS::CloudFormation::Init" : {
"config" : {
"sources": {
- "/home/ec2-user/sample" : "https://s3.amazonaws.com/cloudformation-examples/CloudFormationRailsSample.zip"
+''' + \
+ '"/home/ec2-user/sample" : "https://s3.amazonaws.com/' + \
+ 'cloudformation-examples/CloudFormationRailsSample.zip"' + \
+ '''
},
"files" : {
"/tmp/_files_test_/epel.repo" : {
self.m.StubOutWithMock(os, 'chmod')
subprocess.Popen(['su', 'root', '-c',
- 'wget -O /tmp/CloudFormationRailsSample.zip \
-https://s3.amazonaws.com/cloudformation-examples/CloudFormationRailsSample.zip'],
+ 'wget -O /tmp/CloudFormationRailsSample.zip ' + \
+ 'https://s3.amazonaws.com/cloudformation-' + \
+ 'examples/CloudFormationRailsSample.zip'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE).AndReturn(PopenMock())
"Parameters" : {
"KeyName" : {
- "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
+''' + \
+ '"Description" : "Name of an existing EC2' + \
+ 'KeyPair to enable SSH access to the instances",' + \
+'''
"Type" : "String"
}
},
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "test.",
"Parameters" : {
-
"KeyName" : {
- "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
+''' + \
+ '"Description" : "Name of an existing EC2 KeyPair to' + \
+ 'enable SSH access to the instances",' + \
+'''
"Type" : "String"
}
},
"Parameters" : {
"KeyName" : {
- "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
- "Type" : "String"
+''' + \
+ '"Description" : "Name of an existing EC2 KeyPair to enable SSH ' + \
+ 'access to the instances",' + \
+''' "Type" : "String"
}
},
"WikiDatabase": {
"Type": "AWS::EC2::Instance",
"Properties": {
- "ImageId" : { "Fn::FindInMap" : [ "DistroArch2AMI", { "Ref" : "LinuxDistribution" },
- { "Fn::FindInMap" : [ "AWSInstanceType2Arch", { "Ref" : "InstanceType" }, "Arch" ] } ] },
+''' + \
+ '"ImageId" : { "Fn::FindInMap" : [ "DistroArch2AMI", { "Ref" : ' + \
+ '"LinuxDistribution" },' + \
+ '{ "Fn::FindInMap" : [ "AWSInstanceType2Arch", { "Ref" : ' + \
+ '"InstanceType" }, "Arch" ] } ] },' + \
+'''
"InstanceType": "m1.large",
"KeyName": "test_KeyName"
}
self.m.ReplayAll()
manager = managers.EngineManager()
- res = dict(manager.validate_template(None, t, params)['ValidateTemplateResult'])
+ res = dict(manager.\
+ validate_template(None, t, params)['ValidateTemplateResult'])
print 'res %s' % res
assert (res['Description'] == 'Successfully validated')
self.m.ReplayAll()
manager = managers.EngineManager()
- res = dict(manager.validate_template(None, t, params)['ValidateTemplateResult'])
+ res = dict(manager.\
+ validate_template(None, t, params)['ValidateTemplateResult'])
assert (res['Description'] != 'Successfully validated')
def test_validate_findinmap_valid(self):
self.m.ReplayAll()
manager = managers.EngineManager()
- res = dict(manager.validate_template(None, t, params)['ValidateTemplateResult'])
+ res = dict(manager.\
+ validate_template(None, t, params)['ValidateTemplateResult'])
assert (res['Description'] == 'Successfully validated')
def test_validate_findinmap_invalid(self):
self.m.ReplayAll()
manager = managers.EngineManager()
- res = dict(manager.validate_template(None, t, params)['ValidateTemplateResult'])
+ res = dict(manager.\
+ validate_template(None, t, params)['ValidateTemplateResult'])
assert (res['Description'] != 'Successfully validated')
# allows testing of the test directly, shown below