#NEWLINE# def test_IO_write( self ) : #NEWLINE# #INDENT# socket = MagicMock ( ) #NEWLINE# protocol = self . factory . getProtocol ( socket ) #NEWLINE# protocol . logger = MagicMock ( ) #NEWLINE# protocol . write ( self . request ) #NEWLINE# protocol . logger . debug . assert_any_call ( 'KMIPProtocol.write: {0}' . format ( binascii . hexlify ( self . request ) ) ) #NEWLINE# protocol . socket . sendall . assert_called_once_with ( self . request )