<s> """<STR_LIT>""" <EOL> from mock import patch , MagicMock <EOL> from braubuddy . tests import BraubuddyTestCase <EOL> from braubuddy . output import graphiteapi <EOL> class GraphiteAPIOutput ( BraubuddyTestCase ) : <EOL> @ patch ( '<STR_LIT>' ) <EOL> def test_graphitesend_initialised ( self , mk_graphitesend_init ) : <EOL> """<STR_LIT>""" <EOL> output = graphiteapi . GraphiteAPIOutput ( <EOL> units = '<STR_LIT>' , host = '<STR_LIT>' , port = <NUM_LIT> , <EOL> prefix = '<STR_LIT>' ) <EOL> mk_graphitesend_init . assert_called_with ( <EOL> graphite_server = '<STR_LIT>' , graphite_port = <NUM_LIT> , <EOL> prefix = '<STR_LIT>' , system_name = '<STR_LIT>' ) <EOL> @ patch ( '<STR_LIT>' ) <EOL> def test_publish_metrics ( self , mk_graphitesend_init ) : <EOL> output = graphiteapi . GraphiteAPIOutput ( <EOL> units = '<STR_LIT>' , host = '<STR_LIT>' , port = <NUM_LIT> , <EOL> prefix = '<STR_LIT>' ) <EOL> output . _api = MagicMock ( ) <EOL> output . publish_status ( <NUM_LIT> , <NUM_LIT:20> , <NUM_LIT:0> , <NUM_LIT:100> ) <EOL> output . _api . send_dict . assert_called_with ( { <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : <NUM_LIT:20> , <EOL> '<STR_LIT>' : <NUM_LIT:0> , <EOL> '<STR_LIT>' : <NUM_LIT:100> , <EOL> } ) </s>
