summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_ftplib.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index 824b7c1..6a65165 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -588,6 +588,10 @@ class TestFTPClass(TestCase):
self.client.storlines('stor foo', f, callback=lambda x: flag.append(None))
self.assertTrue(flag)
+ f = io.StringIO(RETR_DATA.replace('\r\n', '\n'))
+ # storlines() expects a binary file, not a text file
+ self.assertRaises(TypeError, self.client.storlines, 'stor foo', f)
+
def test_nlst(self):
self.client.nlst()
self.assertEqual(self.client.nlst(), NLST_DATA.split('\r\n')[:-1])