#NEWLINE# def test_remote_log_tools_state_when_remote_is_up( self ) : #NEWLINE# #INDENT# fake_connection = flexmock ( name = 'fake_connection' ) #NEWLINE# fake_connection . should_receive ( 'request' ) . with_args ( 'POST' , '/upload' , self . payload , AppScaleLogger . HEADERS ) . and_return ( ) #NEWLINE# flexmock ( httplib ) . should_receive ( 'HTTPConnection' ) . and_return ( fake_connection ) #NEWLINE# actual = AppScaleLogger . remote_log_tools_state ( self . options , self . my_id , 'started' , 'X.Y.Z' ) #NEWLINE# self . assertEquals ( self . expected , actual )