#NEWLINE# @ patch ( 'paasta_tools.cli.utils.gethostbyname_ex' ) #NEWLINE# def test_ok_remote_masters( mock_get_by_hostname ) : #NEWLINE# #INDENT# mock_get_by_hostname . return_value = ( 'myhost' , [ ] , [ '1.2.3.4' , '1.2.3.5' ] ) #NEWLINE# ( ips , output ) = utils . calculate_remote_masters ( 'myhost' ) #NEWLINE# assert ( mock_get_by_hostname is None ) #NEWLINE# assert ( ips == [ '1.2.3.4' , '1.2.3.5' ] )