#NEWLINE# def test_visible_name_is_updated_if_host_exists( self ) : #NEWLINE# #INDENT# self . api . host . get . return_value = [ { #NEWLINE# #INDENT# 'hostid' : 5 , #NEWLINE# #UNINDENT# } ] #NEWLINE# self . zabbix_client . update_host_visible_name ( self . instance ) #NEWLINE# expected_host_name = self . zabbix_client . get_host_name ( self . instance ) #NEWLINE# expected_visible_name = self . zabbix_client . get_host_visible_name ( self . instance ) #NEWLINE# self . api . host . get . assert_called_once_with ( filter = { #NEWLINE# #INDENT# 'host' : expected_host_name , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . api . host . update . assert_called_once_with ( { #NEWLINE# #INDENT# 'hostid' : 5 , #NEWLINE# 'name' : expected_visible_name , #NEWLINE# #UNINDENT# } )