summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2011-05-07 14:06:59 (GMT)
committerGiampaolo Rodola' <g.rodola@gmail.com>2011-05-07 14:06:59 (GMT)
commita55efb3b6fe8c386a01b7fe7e9cf91d455fb4b7a (patch)
tree3e8a5d2fd90ee56601fcbccb57ac4f0b192c5e01 /Lib
parent052a899d5a38c4aaac09d86f2f8d1f6093f866c0 (diff)
downloadcpython-a55efb3b6fe8c386a01b7fe7e9cf91d455fb4b7a.zip
cpython-a55efb3b6fe8c386a01b7fe7e9cf91d455fb4b7a.tar.gz
cpython-a55efb3b6fe8c386a01b7fe7e9cf91d455fb4b7a.tar.bz2
#11072- applying http://bugs.python.org/review/11072/show suggestions
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ftplib.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index 8d75b96..cf961ae 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -586,10 +586,12 @@ class TestFTPClass(TestCase):
ls = list(self.client.mlsd())
for name, facts in ls:
+ self.assertIsInstance(name, str)
+ self.assertIsInstance(facts, dict)
self.assertTrue(name)
- self.assertTrue('type' in facts)
- self.assertTrue('perm' in facts)
- self.assertTrue('unique' in facts)
+ self.assertIn('type', facts)
+ self.assertIn('perm', facts)
+ self.assertIn('unique', facts)
def set_data(data):
self.server.handler_instance.next_data = data
@@ -626,7 +628,8 @@ class TestFTPClass(TestCase):
# case sensitiveness
set_data('Type=type;TyPe=perm;UNIQUE=unique; name\r\n')
_name, facts = next(self.client.mlsd())
- [self.assertTrue(x.islower()) for x in facts.keys()]
+ for x in facts:
+ self.assertTrue(x.islower())
# no data (directory empty)
set_data('')
self.assertRaises(StopIteration, next, self.client.mlsd())