diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2013-03-06 03:25:34 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2013-03-06 04:18:26 -0500 |
commit | 3cb07d22276d7eb30cca4bb7155a13ad0b29c332 (patch) | |
tree | aff2bdfc2587e5089014f6aeb38c2559b0c9b8af /tests | |
parent | a2e93441dea94921b1795647fc8295b49e06fa59 (diff) | |
download | pycurl-3cb07d22276d7eb30cca4bb7155a13ad0b29c332.tar.gz |
Adjust ftp test to work with vsftpd started from project root
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ftp_test.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/ftp_test.py b/tests/ftp_test.py index d215b6e..1d382ed 100644 --- a/tests/ftp_test.py +++ b/tests/ftp_test.py @@ -2,6 +2,8 @@ # -*- coding: iso-8859-1 -*- # vi:ts=4:et +# Note: this test is meant to be run from pycurl project root. + import pycurl import unittest @@ -15,29 +17,29 @@ class FtpTest(unittest.TestCase): self.curl.close() def test_get_ftp(self): - self.curl.setopt(pycurl.URL, 'ftp://localhost:8921') + self.curl.setopt(pycurl.URL, 'ftp://localhost:8321') sio = util.StringIO() self.curl.setopt(pycurl.WRITEFUNCTION, sio.write) self.curl.perform() result = sio.getvalue() assert 'README' in result - assert 'bin -> usr/bin' in result + assert 'INSTALL' in result # XXX this test needs to be fixed def test_quote(self): - self.curl.setopt(pycurl.URL, 'ftp://localhost:8921') + self.curl.setopt(pycurl.URL, 'ftp://localhost:8321') sio = util.StringIO() self.curl.setopt(pycurl.WRITEFUNCTION, sio.write) - self.curl.setopt(pycurl.QUOTE, ['CWD pub']) + self.curl.setopt(pycurl.QUOTE, ['CWD tests']) self.curl.perform() result = sio.getvalue() - assert 'README' in result - assert 'bin -> usr/bin' in result + assert 'README' not in result + assert 'ftp_test.py' in result def test_epsv(self): - self.curl.setopt(pycurl.URL, 'ftp://localhost:8921') + self.curl.setopt(pycurl.URL, 'ftp://localhost:8321') sio = util.StringIO() self.curl.setopt(pycurl.WRITEFUNCTION, sio.write) self.curl.setopt(pycurl.FTP_USE_EPSV, 1) @@ -45,4 +47,4 @@ class FtpTest(unittest.TestCase): result = sio.getvalue() assert 'README' in result - assert 'bin -> usr/bin' in result + assert 'INSTALL' in result |