]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix pep8 errors
authorChris Alfonso <calfonso@redhat.com>
Mon, 14 May 2012 13:55:50 +0000 (09:55 -0400)
committerChris Alfonso <calfonso@redhat.com>
Mon, 14 May 2012 13:55:50 +0000 (09:55 -0400)
heat/tests/test_cfn.py
heat/tests/test_validate.py

index 44cc77aa35ec069d9d8d80d1ca844fd5e996cf72..c1ea573208f25181a7a8cb91b70d0db5cff8f89c 100644 (file)
@@ -142,7 +142,10 @@ class MetadataTest(unittest.TestCase):
         "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" : {
@@ -180,8 +183,9 @@ class MetadataTest(unittest.TestCase):
         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())
 
index a1ad840890a57e6ccd210cf0f76b2e08d8995263..4d90e4437d7cda9c9c74070c424b6b1c7ace19ed 100644 (file)
@@ -56,7 +56,10 @@ test_template_ref = '''
   "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"
     }
   },
@@ -93,9 +96,11 @@ test_template_findinmap_valid = '''
   "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"
     }
   },
@@ -135,8 +140,10 @@ test_template_findinmap_invalid = '''
   "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"
     }
   },
 
@@ -161,8 +168,12 @@ test_template_findinmap_invalid = '''
     "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"
       }
@@ -244,7 +255,8 @@ class validateTest(unittest.TestCase):
         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')
 
@@ -259,7 +271,8 @@ class validateTest(unittest.TestCase):
         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):
@@ -273,7 +286,8 @@ class validateTest(unittest.TestCase):
         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):
@@ -287,7 +301,8 @@ class validateTest(unittest.TestCase):
         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