class documentation

class IReadWriteTestsMixin: (source)

Known subclasses: twisted.test.test_ftp.FTPReadWriteTests

View In Hierarchy

Generic tests for the IReadFile and IWriteFile interfaces.

Method getFileContent Return the content of the file used.
Method getFileReader Return an object providing IReadFile, ready to send data content.
Method getFileWriter Return an object providing IWriteFile, ready to receive data.
Method test_read Test ftp.IReadFile: the implementation should have a send method returning a Deferred which fires when all the data has been sent to the consumer, and the data should be correctly send to the consumer.
Method test_write Test ftp.IWriteFile: the implementation should have a receive method returning a Deferred which fires with a consumer ready to receive data to be written. It should also have a close() method that returns a Deferred.
def getFileContent(self): (source)

Return the content of the file used.

def getFileReader(self, content): (source)

Return an object providing IReadFile, ready to send data content.

Parameters
contentdata to send
def getFileWriter(self): (source)

Return an object providing IWriteFile, ready to receive data.

def test_read(self): (source)

Test ftp.IReadFile: the implementation should have a send method returning a Deferred which fires when all the data has been sent to the consumer, and the data should be correctly send to the consumer.

def test_write(self): (source)

Test ftp.IWriteFile: the implementation should have a receive method returning a Deferred which fires with a consumer ready to receive data to be written. It should also have a close() method that returns a Deferred.