Known subclasses: twisted.test.test_ftp.FTPShellTests

Generic tests for the IFTPShell interface.

Method directoryExists Test if the directory exists at path.
Method createDirectory Create a directory in path.
Method fileExists Test if the file exists at path.
Method createFile Create a file named path with some content.
Method test_createDirectory directoryExists should report correctly about directory existence, and createDirectory should create a directory detectable by directoryExists.
Method test_createFile fileExists should report correctly about file existence, and createFile should create a file detectable by fileExists.
Method test_makeDirectory Create a directory and check it ends in the filesystem.
Method test_makeDirectoryError Creating a directory that already exists should fail with a ftp.FileExistsError.
Method test_removeDirectory Try to remove a directory and check it's removed from the filesystem.
Method test_removeDirectoryOnFile removeDirectory should not work in file and fail with a ftp.IsNotADirectoryError.
Method test_removeNotExistingDirectory Removing directory that doesn't exist should fail with a ftp.FileNotFoundError.
Method test_removeFile Try to remove a file and check it's removed from the filesystem.
Method test_removeFileOnDirectory removeFile should not work on directory.
Method test_removeNotExistingFile Try to remove a non existent file, and check it raises a ftp.FileNotFoundError.
Method test_list Check the output of the list method.
Method test_listWithStat Check the output of list with asked stats.
Method test_listWithInvalidStat Querying an invalid stat should result to a AttributeError.
Method test_listFile Check the output of the list method on a file.
Method test_listNotExistingDirectory list on a directory that doesn't exist should fail with a ftp.FileNotFoundError.
Method test_access Try to access a resource.
Method test_accessNotFound access should fail on a resource that doesn't exist.
Method test_openForReading Check that openForReading returns an object providing ftp.IReadFile.
Method test_openForReadingNotFound openForReading should fail with a ftp.FileNotFoundError on a file that doesn't exist.
Method test_openForReadingOnDirectory openForReading should not work on directory.
Method test_openForWriting Check that openForWriting returns an object providing ftp.IWriteFile.
Method test_openForWritingExistingDirectory openForWriting should not be able to open a directory that already exists.
Method test_openForWritingInNotExistingDirectory openForWring should fail with a ftp.FileNotFoundError if you specify a file in a directory that doesn't exist.
Method test_statFile Check the output of the stat method on a file.
Method test_statDirectory Check the output of the stat method on a directory.
Method test_statOwnerGroup Check the owner and groups stats.
Method test_statHardlinksNotImplemented If twisted.python.filepath.FilePath.getNumberOfHardLinks is not implemented, the number returned is 0
Method test_statOwnerGroupNotImplemented If twisted.python.filepath.FilePath.getUserID or twisted.python.filepath.FilePath.getGroupID are not implemented, the owner returned is "0" and the group is returned as "0"
Method test_statNotExisting stat should fail with ftp.FileNotFoundError on a file that doesn't exist.
Method test_invalidStat Querying an invalid stat should result to a AttributeError.
Method test_rename Try to rename a directory.
Method test_renameNotExisting Renaming a directory that doesn't exist should fail with ftp.FileNotFoundError.
def directoryExists(self, path):

Test if the directory exists at path.

Parameterspaththe relative path to check. (type: str.)
ReturnsTrue if path exists and is a directory, False if it's not the case (type: bool)
def createDirectory(self, path):

Create a directory in path.

Parameterspaththe relative path of the directory to create, with one segment. (type: str)
def fileExists(self, path):

Test if the file exists at path.

Parameterspaththe relative path to check. (type: str.)
ReturnsTrue if path exists and is a file, False if it's not the case. (type: bool)
def createFile(self, path, fileContent=''):

Create a file named path with some content.

Parameterspaththe relative path of the file to create, without directory. (type: str)
fileContentthe content of the file. (type: str)
def test_createDirectory(self):

directoryExists should report correctly about directory existence, and createDirectory should create a directory detectable by directoryExists.

def test_createFile(self):

fileExists should report correctly about file existence, and createFile should create a file detectable by fileExists.

def test_makeDirectory(self):

Create a directory and check it ends in the filesystem.

def test_makeDirectoryError(self):

Creating a directory that already exists should fail with a ftp.FileExistsError.

def test_removeDirectory(self):

Try to remove a directory and check it's removed from the filesystem.

def test_removeDirectoryOnFile(self):

removeDirectory should not work in file and fail with a ftp.IsNotADirectoryError.

def test_removeNotExistingDirectory(self):

Removing directory that doesn't exist should fail with a ftp.FileNotFoundError.

def test_removeFile(self):

Try to remove a file and check it's removed from the filesystem.

def test_removeFileOnDirectory(self):

removeFile should not work on directory.

def test_removeNotExistingFile(self):

Try to remove a non existent file, and check it raises a ftp.FileNotFoundError.

def test_list(self):

Check the output of the list method.

def test_listWithStat(self):

Check the output of list with asked stats.

def test_listWithInvalidStat(self):

Querying an invalid stat should result to a AttributeError.

def test_listFile(self):

Check the output of the list method on a file.

def test_listNotExistingDirectory(self):

list on a directory that doesn't exist should fail with a ftp.FileNotFoundError.

def test_access(self):

Try to access a resource.

def test_accessNotFound(self):

access should fail on a resource that doesn't exist.

def test_openForReading(self):

Check that openForReading returns an object providing ftp.IReadFile.

def test_openForReadingNotFound(self):

openForReading should fail with a ftp.FileNotFoundError on a file that doesn't exist.

def test_openForReadingOnDirectory(self):

openForReading should not work on directory.

def test_openForWriting(self):

Check that openForWriting returns an object providing ftp.IWriteFile.

def test_openForWritingExistingDirectory(self):

openForWriting should not be able to open a directory that already exists.

def test_openForWritingInNotExistingDirectory(self):

openForWring should fail with a ftp.FileNotFoundError if you specify a file in a directory that doesn't exist.

def test_statFile(self):

Check the output of the stat method on a file.

def test_statDirectory(self):

Check the output of the stat method on a directory.

def test_statOwnerGroup(self):

Check the owner and groups stats.

def test_statHardlinksNotImplemented(self):

If twisted.python.filepath.FilePath.getNumberOfHardLinks is not implemented, the number returned is 0

def test_statOwnerGroupNotImplemented(self):

If twisted.python.filepath.FilePath.getUserID or twisted.python.filepath.FilePath.getGroupID are not implemented, the owner returned is "0" and the group is returned as "0"

def test_statNotExisting(self):

stat should fail with ftp.FileNotFoundError on a file that doesn't exist.

def test_invalidStat(self):

Querying an invalid stat should result to a AttributeError.

def test_rename(self):

Try to rename a directory.

def test_renameNotExisting(self):

Renaming a directory that doesn't exist should fail with ftp.FileNotFoundError.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.