'If there is an error while producing the message body to the
connection, the C{sendError} callback is invoked.'

def test_transferError(self):

    client = MySMTPClient(('alice@example.com', ['bob@example.com'], BytesIO('foo')))
    transport = StringTransport()
    client.makeConnection(transport)
    client.dataReceived('220    Ok\r\n250    Ok\r\n250    Ok\r\n250    Ok\r\n354    Ok\r\n')
    self.assertNotIdentical(transport.producer, None)
    self.assertFalse(transport.streaming)
    transport.producer.stopProducing()
    self.assertIsInstance(client._error, Exception)
