twisted.test.test_ftp.IFTPShellTestsMixin class documentationtwisted.test.test_ftp
(View In Hierarchy)
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 pathwith some content. | 
| Method | test_createDirectory | directoryExistsshould report correctly about directory 
existence, andcreateDirectoryshould create a directory 
detectable bydirectoryExists. | 
| Method | test_createFile | fileExistsshould report correctly about file existence, 
andcreateFileshould create a file detectable byfileExists. | 
| 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.FileNotFoundErroron 
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.FileNotFoundErrorif 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.getNumberOfHardLinksis not implemented, the number returned is 0 | 
| Method | test_statOwnerGroupNotImplemented | If twisted.python.filepath.FilePath.getUserIDortwisted.python.filepath.FilePath.getGroupIDare not implemented, the owner returned is "0" and the group is 
returned as "0" | 
| Method | test_statNotExisting | stat should fail with ftp.FileNotFoundErroron 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. | 
Test if the directory exists at path.
| Parameters | path | the relative path to check. (type: str.) | 
| Returns | Trueifpathexists and is a directory,Falseif it's not the case (type:bool) | |
Create a directory in path.
| Parameters | path | the relative path of the directory to create, with one segment. (type: str) | 
Test if the file exists at path.
| Parameters | path | the relative path to check. (type: str.) | 
| Returns | Trueifpathexists and is a file,Falseif it's not the case. (type:bool) | |
Create a file named path with some content.
| Parameters | path | the relative path of the file to create, without directory. (type: str) | 
| fileContent | the content of the file. (type: str) | 
directoryExists should report correctly about directory 
existence, and createDirectory should create a directory 
detectable by directoryExists.
fileExists should report correctly about file existence, 
and createFile should create a file detectable by 
fileExists.
Creating a directory that already exists should fail with a 
ftp.FileExistsError.
Try to remove a directory and check it's removed from the filesystem.
removeDirectory should not work in file and fail with a 
ftp.IsNotADirectoryError.
Removing directory that doesn't exist should fail with a 
ftp.FileNotFoundError.
Try to remove a non existent file, and check it raises a ftp.FileNotFoundError.
list on a directory that doesn't exist should fail with a ftp.FileNotFoundError.
openForReading should fail with a ftp.FileNotFoundError on 
a file that doesn't exist.
Check that openForWriting returns an object providing 
ftp.IWriteFile.
openForWriting should not be able to open a directory that already exists.
openForWring should fail with a ftp.FileNotFoundError
if you specify a file in a directory that doesn't exist.
If twisted.python.filepath.FilePath.getNumberOfHardLinks
is not implemented, the number returned is 0
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"
stat should fail with ftp.FileNotFoundError
on a file that doesn't exist.
Renaming a directory that doesn't exist should fail with ftp.FileNotFoundError.