11from stacker .context import Context
2+ from stacker .config import Config
23from stacker .variables import Variable
34
45from stacker_blueprints .route53 import (
89
910from stacker .blueprints .testutil import BlueprintTestCase
1011
12+
1113class TestRoute53 (BlueprintTestCase ):
1214 def setUp (self ):
13- self .ctx = Context ({'namespace' : 'test' })
15+ self .ctx = Context (config = Config ( {'namespace' : 'test' }) )
1416
1517 def test_create_template_hosted_zone_id (self ):
1618 blueprint = DNSRecords ('route53_dnsrecords' , self .ctx )
@@ -92,10 +94,12 @@ def test_cloudfront_alias_adds_hosted_zone_id(self):
9294 ]
9395 )
9496 record_sets = blueprint .create_template ()
95- self .assertEqual (record_sets [0 ].AliasTarget .HostedZoneId , "Z2FDTNDATAQYW2" )
97+ self .assertEqual (record_sets [0 ].AliasTarget .HostedZoneId ,
98+ "Z2FDTNDATAQYW2" )
9699
97100 def test_elb_alias_proper_hosted_zone_id (self ):
98- blueprint = DNSRecords ('test_route53_elb_alias_hosted_zone_id' , self .ctx )
101+ blueprint = DNSRecords ('test_route53_elb_alias_hosted_zone_id' ,
102+ self .ctx )
99103 blueprint .resolve_variables (
100104 [
101105 Variable (
@@ -105,7 +109,7 @@ def test_elb_alias_proper_hosted_zone_id(self):
105109 "Name" : "host.testdomain.com." ,
106110 "Type" : "A" ,
107111 "AliasTarget" : {
108- "DNSName" : "myelb-1234567890-abcdef.us-east-2.elb.amazonaws.com." ,
112+ "DNSName" : "myelb-1234567890-abcdef.us-east-2.elb.amazonaws.com." , # noqa
109113 },
110114 },
111115 ]
0 commit comments