#NEWLINE# @ mock . patch ( 'homeassistant.components.graphite.GraphiteFeeder' ) #NEWLINE# def test_config_bad_port( self , mock_gf ) : #NEWLINE# #INDENT# 'Test setup with invalid port.' #NEWLINE# config = { #NEWLINE# #INDENT# 'graphite' : { #NEWLINE# #INDENT# 'host' : 'foo' , #NEWLINE# 'port' : 'wrong' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertFalse ( graphite . setup ( mock_gf . hass , config ) ) #NEWLINE# self . assertFalse ( mock_gf . called )