class IFTPShellTestsMixin: (source)
Known subclasses: twisted.test.test_ftp.FTPShellTests
Generic tests for the IFTPShell interface.
Method | create |
Create a directory in path. |
Method | create |
Create a file named path with some content. |
Method | directory |
Test if the directory exists at path. |
Method | file |
Test if the file exists at path. |
Method | test |
Try to access a resource. |
Method | test_access |
access should fail on a resource that doesn't exist. |
Method | test_create |
directoryExists should report correctly about directory existence, and createDirectory should create a directory detectable by directoryExists. |
Method | test_create |
fileExists should report correctly about file existence, and createFile should create a file detectable by fileExists. |
Method | test_invalid |
Querying an invalid stat should result to a AttributeError. |
Method | test |
Check the output of the list method. |
Method | test_list |
Check the output of the list method on a file. |
Method | test_list |
list on a directory that doesn't exist should fail with a ftp.FileNotFoundError . |
Method | test_list |
Querying an invalid stat should result to a AttributeError. |
Method | test_list |
Check the output of list with asked stats. |
Method | test_make |
Create a directory and check it ends in the filesystem. |
Method | test_make |
Creating a directory that already exists should fail with a ftp.FileExistsError. |
Method | test_open |
Check that openForReading returns an object providing ftp.IReadFile. |
Method | test_open |
openForReading should fail with a ftp.FileNotFoundError on a file that doesn't exist. |
Method | test_open |
openForReading should not work on directory. |
Method | test_open |
Check that openForWriting returns an object providing ftp.IWriteFile. |
Method | test_open |
openForWriting should not be able to open a directory that already exists. |
Method | test_open |
openForWring should fail with a ftp.FileNotFoundError if you specify a file in a directory that doesn't exist. |
Method | test_remove |
Try to remove a directory and check it's removed from the filesystem. |
Method | test_remove |
removeDirectory should not work in file and fail with a ftp.IsNotADirectoryError. |
Method | test_remove |
Try to remove a file and check it's removed from the filesystem. |
Method | test_remove |
removeFile should not work on directory. |
Method | test_remove |
Removing directory that doesn't exist should fail with a ftp.FileNotFoundError. |
Method | test_remove |
Try to remove a non existent file, and check it raises a ftp.FileNotFoundError . |
Method | test |
Try to rename a directory. |
Method | test_rename |
Renaming a directory that doesn't exist should fail with ftp.FileNotFoundError . |
Method | test_stat |
Check the output of the stat method on a directory. |
Method | test_stat |
Check the output of the stat method on a file. |
Method | test_stat |
If twisted.python.filepath.FilePath.getNumberOfHardLinks is not implemented, the number returned is 0 |
Method | test_stat |
stat should fail with ftp.FileNotFoundError on a file that doesn't exist. |
Method | test_stat |
Check the owner and groups stats. |
Method | test_stat |
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" |
twisted.test.test_ftp.FTPShellTests
Create a directory in path.
Parameters | |
path:str | the relative path of the directory to create, with one segment. |
twisted.test.test_ftp.FTPShellTests
Create a file named path with some content.
Parameters | |
path:str | the relative path of the file to create, without directory. |
file | the content of the file. |
twisted.test.test_ftp.FTPShellTests
Test if the directory exists at path.
Parameters | |
path:str. | the relative path to check. |
Returns | |
bool | True if path exists and is a directory, False if it's not the case |
twisted.test.test_ftp.FTPShellTests
Test if the file exists at path.
Parameters | |
path:str. | the relative path to check. |
Returns | |
bool | True if path exists and is a file, False if it's not the case. |
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.
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"