#NEWLINE# def test_get_deployments_strings_protocol_tcp_case( ) : #NEWLINE# #INDENT# with contextlib . nested ( mock . patch ( 'paasta_tools.cli.cmds.info.get_actual_deployments' , autospec = True ) , mock . patch ( 'paasta_tools.cli.cmds.info.load_service_namespace_config' , autospec = True ) ) as ( mock_get_actual_deployments , mock_load_service_namespace_config ) : #NEWLINE# #INDENT# mock_get_actual_deployments . return_value = [ 'clusterA.main' , 'clusterB.main' ] #NEWLINE# mock_load_service_namespace_config . return_value = ServiceNamespaceConfig ( { #NEWLINE# #INDENT# 'mode' : 'tcp' , #NEWLINE# 'proxy_port' : 8080 , #NEWLINE# #UNINDENT# } ) #NEWLINE# actual = info . get_deployments_strings ( 'unused' , '/fake/soa/dir' ) #NEWLINE# assert ( ( ' - clusterA (%s)' % PaastaColors . cyan ( 'tcp://paasta-clusterA.yelp:8080/' ) ) in actual ) #NEWLINE# assert ( ( ' - clusterB (%s)' % PaastaColors . cyan ( 'tcp://paasta-clusterB.yelp:8080/' ) ) in actual )