#NEWLINE# def test_get_deployments_strings_default_case_with_smartstack( ) : #NEWLINE# #INDENT# with contextlib . nested ( mock . patch ( 'paasta_tools.cli.cmds.info.get_actual_deployments' , autospec = True ) , mock . patch ( 'service_configuration_lib.read_service_configuration' , autospec = True ) ) as ( mock_get_actual_deployments , mock_read_service_configuration ) : #NEWLINE# #INDENT# mock_get_actual_deployments . return_value = [ 'clusterA.main' , 'clusterB.main' ] #NEWLINE# mock_read_service_configuration . return_value = { #NEWLINE# #INDENT# 'smartstack' : { #NEWLINE# #INDENT# 'main' : { #NEWLINE# #INDENT# 'proxy_port' : 9001 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# actual = info . get_deployments_strings ( 'fake_service' , '/fake/soa/dir' ) #NEWLINE# assert ( ( ' - clusterA (%s)' % PaastaColors . cyan ( 'http://fake_service.paasta-clusterA.yelp/' ) ) in actual ) #NEWLINE# assert ( ( ' - clusterB (%s)' % PaastaColors . cyan ( 'http://fake_service.paasta-clusterB.yelp/' ) ) in actual )