-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds SFTP server container to docker compose - Adds lines for testing read() operations
- Loading branch information
1 parent
7de506d
commit c805dd5
Showing
2 changed files
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,22 +62,28 @@ def test_https(): | |
# Rebex test server. | ||
# """ | ||
# fs = FileStore('sftp://demo:[email protected]') | ||
# # fs = FileStore('sftp://sftp_test_user:password@localhost:2222') | ||
# # fs.upload('readme.txt', 'readme.txt') | ||
# assert fs.exists('readme.txt') != [] | ||
# assert fs.get('readme.txt') is not None | ||
# sftpfile = fs.read('readme.txt') | ||
# assert sftpfile.read() is not None | ||
|
||
|
||
def test_ftp(): | ||
""" | ||
Test FTP FileStore by fetching the readme.txt file from | ||
Rebex test server. | ||
containerized server. | ||
""" | ||
fs = FileStore('ftp://al_test_user:password@localhost') | ||
|
||
fs.upload('readme.txt', 'readme.txt') | ||
# fs = FileStore('ftp://demo:[email protected]') | ||
assert fs.exists('readme.txt') != [] | ||
assert fs.get('readme.txt') is not None | ||
ftpfile = fs.read('readme.txt') | ||
assert ftpfile.read() is not None | ||
fs.delete('readme.txt') | ||
assert fs.exists('readme.txt') == [] | ||
|
||
|
||
# def test_ftps(): | ||
|
@@ -88,6 +94,8 @@ def test_ftp(): | |
# fs = FileStore('ftps://demo:[email protected]') | ||
# assert fs.exists('readme.txt') != [] | ||
# assert fs.get('readme.txt') is not None | ||
# ftpsfile = fs.read('readme.txt') | ||
# assert ftpsfile.read() is not None | ||
|
||
|
||
def test_file(): | ||
|