def write(self, data, dummy=None):
    """Stub Write method."""
    assert not self.closed
    if self.expected_write_data is None:
      return

    expected_data = self.expected_write_data.pop(0)
    if expected_data != data:
      raise ValueError('Expected %s, got %s (%s)' % (
          self._dotify(expected_data), binascii.hexlify(data),
          self._dotify(data)))
def write ( self , data , dummy = None ) : assert not self . closed if self . expected_write_data is None : return expected_data = self . expected_write_data . pop ( 0 ) if expected_data != data : raise ValueError ( 'Expected %s, got %s (%s)' % ( self . _dotify ( expected_data ) , binascii . hexlify ( data ) , self . _dotify ( data ) ) )
Stub Write method.