]> granicus.if.org Git - python/commitdiff
Fix improper tests in RegisterTestCase
authorÉric Araujo <merwok@netwok.org>
Thu, 14 Apr 2011 01:49:19 +0000 (03:49 +0200)
committerÉric Araujo <merwok@netwok.org>
Thu, 14 Apr 2011 01:49:19 +0000 (03:49 +0200)
Lib/distutils/tests/test_register.py

index c712f56a788e6aabcdb120e01977f823aedf8b49..cb72a115382b8a966416a3311ad8e25167f728f8 100644 (file)
@@ -137,7 +137,7 @@ class RegisterTestCase(PyPIRCCommandTestCase):
 
         # let's see what the server received : we should
         # have 2 similar requests
-        self.assertTrue(self.conn.reqs, 2)
+        self.assertEqual(len(self.conn.reqs), 2)
         req1 = dict(self.conn.reqs[0].headers)
         req2 = dict(self.conn.reqs[1].headers)
 
@@ -169,7 +169,7 @@ class RegisterTestCase(PyPIRCCommandTestCase):
             del register_module.input
 
         # we should have send a request
-        self.assertTrue(self.conn.reqs, 1)
+        self.assertEqual(len(self.conn.reqs), 1)
         req = self.conn.reqs[0]
         headers = dict(req.headers)
         self.assertEqual(headers['Content-length'], '608')
@@ -187,7 +187,7 @@ class RegisterTestCase(PyPIRCCommandTestCase):
             del register_module.input
 
         # we should have send a request
-        self.assertTrue(self.conn.reqs, 1)
+        self.assertEqual(len(self.conn.reqs), 1)
         req = self.conn.reqs[0]
         headers = dict(req.headers)
         self.assertEqual(headers['Content-length'], '290')