#NEWLINE# @ mock . patch . object ( shade . meta , 'get_server_external_ipv4' ) #NEWLINE# def test_private_interface_ip( self , mock_get_server_external_ipv4 ) : #NEWLINE# #INDENT# mock_get_server_external_ipv4 . return_value = PUBLIC_V4 #NEWLINE# cloud = FakeCloud ( ) #NEWLINE# cloud . private = True #NEWLINE# hostvars = meta . get_hostvars_from_server ( cloud , meta . obj_to_dict ( standard_fake_server ) ) #NEWLINE# self . assertEqual ( PRIVATE_V4 , hostvars [ 'interface_ip' ] )