#NEWLINE# def test_updated_routing_rules( self ) : #NEWLINE# #INDENT# '\n        Calling :func:`publish_docs` updates the routing rules for the\n        "clusterhq-staging-docs" bucket.\n        ' #NEWLINE# aws = FakeAWS ( routing_rules = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , s3_buckets = { #NEWLINE# #INDENT# 'clusterhq-staging-docs' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . publish_docs ( self , '0.3.0+444.gf05215b' , '0.3.1' , environment = Environments . STAGING , routing_config = { #NEWLINE# #INDENT# 'prefix/' : { #NEWLINE# #INDENT# 'key/' : { #NEWLINE# #INDENT# 'replace_key' : 'replace' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertThat ( aws . routing_rules [ 'clusterhq-staging-docs' ] , MatchesRoutingRules ( [ RoutingRule . when ( key_prefix = 'prefix/key/' ) . then_redirect ( replace_key = 'prefix/replace' , hostname = 'docs.staging.clusterhq.com' , protocol = 'https' , http_redirect_code = '302' ) ] ) )