summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ftplib.py
Commit message (Collapse)AuthorAgeFilesLines
* [2.7] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (GH-8791)Christian Heimes2018-08-161-0/+5
| | | | | | | | | | | | | | Read from data socket to avoid "[SSL] shutdown while in init" exception during shutdown of the dummy server. Signed-off-by: Christian Heimes <christian@python.org> <!-- issue-number: [bpo-34391](https://www.bugs.python.org/issue34391) --> https://bugs.python.org/issue34391 <!-- /issue-number -->. (cherry picked from commit 1590c393360df059160145e7475754427bfc6680) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-31518: Change TLS protocol for Debian (#3661)Christian Heimes2018-02-241-3/+3
| | | | | | | Debian Unstable has disabled TLS 1.0 and 1.1 for SSLv23_METHOD(). Change TLS/SSL protocol of some tests to PROTOCOL_TLS or PROTOCOL_TLSv1_2 to make them pass on Debian. Signed-off-by: Christian Heimes <christian@python.org>
* [2.7] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal ↵Dong-hee Na2017-07-261-0/+3
| | | | command (#1214) (#2894)
* Fix test_ftplib warning if IPv6 is not available (#1457)Victor Stinner2017-05-041-6/+12
| | | | | | | | DummyFTPServer now calls del_channel() on bind() error to prevent the following warning in TestIPv6Environment.setUpClass(): Warning -- asyncore.socket_map was modified by test_ftplib Before: {} After: {3: <test.test_ftplib.DummyFTPServer 127.0.0.1:0 at ...>}
* allow a SSLContext to be given to ftplib.FTP_TLSBenjamin Peterson2015-01-041-27/+88
|
* allow ssl module to compile if openssl doesn't support SSL 3 (closes #22935)Benjamin Peterson2014-12-061-1/+1
| | | | Patch by Kurt Roeckx.
* Issue #16056: Rename test methods to avoid conflict.Berker Peksag2014-11-241-4/+0
|
* Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref ↵Serhiy Storchaka2014-02-081-3/+3
| | | | tests.
* Issue #18702: All skipped tests now reported as skipped.Serhiy Storchaka2013-11-031-12/+14
|
* Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read bySerhiy Storchaka2013-10-201-1/+21
| | | | | limiting the call to readline(). Original patch by Michał Jastrzębski and Giampaolo Rodola.
* Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as ↵Antoine Pitrou2013-08-211-4/+4
| | | | possible, since "localhost" goes through a DNS lookup under recent Windows versions.
* Increasing test coverage of ftplib. Patch by Muhammad JehanzebSenthil Kumaran2013-08-131-0/+8
|
* Issue #13453: Try to increase some socket timeouts to make some buildbots stopCharles-François Natali2011-12-191-1/+1
| | | | failing.
* Merged revisions 85492 via svnmerge fromAntoine Pitrou2010-10-141-9/+9
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85492 | antoine.pitrou | 2010-10-14 22:35:26 +0200 (jeu., 14 oct. 2010) | 3 lines Increase timeouts in test_ftplib (for very slow buildbots) ........
* adds handle_error(self):raise to test modules using asyncore to provide a ↵Giampaolo Rodolà2010-05-061-0/+3
| | | | clearer error message in case something goes wrong
* Issue #7449, last part (11): fix many tests if thread support is disabledVictor Stinner2010-04-271-1/+1
| | | | | | * Use try/except ImportError or test_support.import_module() to import thread and threading modules * Add @unittest.skipUnless(threading, ...) to testcases using threads
* Issue #8108: Fix the unwrap() method of SSL objects when the socket hasAntoine Pitrou2010-04-221-11/+36
| | | | | | | | | a non-infinite timeout. Also make that method friendlier with applications wanting to continue using the socket in clear-text mode, by disabling OpenSSL's internal readahead. Thanks to Darryl Miles for guidance. Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of SSL shutdowns.
* Revert r79915 (temporary commit to check for buildbots -> the fix was ↵Antoine Pitrou2010-04-091-36/+11
| | | | successful)
* Temporarily commit fix to issue #8108, to check for buildbot responseAntoine Pitrou2010-04-091-11/+36
|
* Revert r79384 (the fix failed).Antoine Pitrou2010-03-241-11/+2
|
* Trying to fix #8108. Will watch the buildbot(s).Antoine Pitrou2010-03-241-2/+11
|
* Fix an occasional test_ftplib failure, following r79226.Antoine Pitrou2010-03-221-1/+6
|
* #7092: Silence more py3k warnings. Patch by Florent Xicluna.Ezio Melotti2010-02-031-1/+2
|
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-7/+7
|
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-1/+1
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-1/+1
| | | | Patch by flox
* Issue #6845: Add restart support for binary upload in ftplib. TheAntoine Pitrou2009-11-271-1/+27
| | | | | | | `storbinary()` method of FTP and FTP_TLS objects gains an optional `rest` argument. Patch by Pablo Mouzo. (note: the patch also adds a test for the rest argument in retrbinary())
* Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP usingAntoine Pitrou2009-11-151-5/+213
| | | | TLS or SSL. Patch by Giampaolo Rodola'.
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-2/+2
|
* merge in the fix for test_ftplib on some bots [reviewed by Georg]Benjamin Peterson2008-09-281-0/+5
|
* give ftplib a real test suiteBenjamin Peterson2008-09-271-36/+425
| | | | | | | A asyncore based mock ftp server is used to test the protocol. This is all thanks to Giampaolo Rodola #3939 (Barry gave me permission to do this before final on IRC.)
* Fixed the semantic of timeout for socket.create_connection andFacundo Batista2008-05-291-19/+24
| | | | | | all the upper level libraries that use it, including urllib2. Added and fixed some tests, and changed docs correspondingly. Thanks to John J Lee for the patch and the pusing, :)
* - Issue #2550: The approach used by client/server code for obtaining portsTrent Nelson2008-04-081-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to listen on in network-oriented tests has been refined in an effort to facilitate running multiple instances of the entire regression test suite in parallel without issue. test_support.bind_port() has been fixed such that it will always return a unique port -- which wasn't always the case with the previous implementation, especially if socket options had been set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT). The new implementation of bind_port() will actually raise an exception if it is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or SO_REUSEPORT socket option set. Furthermore, if available, bind_port() will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed. This currently only applies to Windows. This option prevents any other sockets from binding to the host/port we've bound to, thus removing the possibility of the 'non-deterministic' behaviour, as Microsoft puts it, that occurs when a second SOCK_STREAM socket binds and accepts to a host/port that's already been bound by another socket. The optional preferred port parameter to bind_port() has been removed. Under no circumstances should tests be hard coding ports! test_support.find_unused_port() has also been introduced, which will pass a temporary socket object to bind_port() in order to obtain an unused port. The temporary socket object is then closed and deleted, and the port is returned. This method should only be used for obtaining an unused port in order to pass to an external program (i.e. the -accept [port] argument to openssl's s_server mode) or as a parameter to a server-oriented class that doesn't give you direct access to the underlying socket used. Finally, test_support.HOST has been introduced, which should be used for the host argument of any relevant socket calls (i.e. bind and connect). The following tests were updated to following the new conventions: test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib, test_poplib, test_ftplib, test_telnetlib, test_socketserver, test_asynchat and test_socket_ssl. It is now possible for multiple instances of the regression test suite to run in parallel without issue.
* Don't use a hard coded port. This test could hang/fail if the port is in use.Neal Norwitz2008-02-261-4/+25
| | | | Speed this test up by avoiding a sleep and using the event.
* Whitespace normalization. Ugh, we really need to do this more often.Neal Norwitz2007-04-251-3/+3
| | | | You might want to review this change as it's my first time. Be gentle. :-)
* Added the posibility to pass the timeout to FTP.connect, not only whenFacundo Batista2007-03-301-5/+30
| | | | instantiating the class. Docs and tests are updated.
* Forgot to add the file before the previous commit, here goFacundo Batista2007-03-261-0/+68
the ftplib tests.