summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2013-03-06 03:25:34 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2013-03-06 04:18:26 -0500
commit3cb07d22276d7eb30cca4bb7155a13ad0b29c332 (patch)
treeaff2bdfc2587e5089014f6aeb38c2559b0c9b8af /tests
parenta2e93441dea94921b1795647fc8295b49e06fa59 (diff)
downloadpycurl-3cb07d22276d7eb30cca4bb7155a13ad0b29c332.tar.gz
Adjust ftp test to work with vsftpd started from project root
Diffstat (limited to 'tests')
-rw-r--r--tests/ftp_test.py18
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