[Python-checkins] cpython (3.1): Fix improper tests in RegisterTestCase
eric.araujo
python-checkins at python.org
Wed Apr 27 16:37:36 CEST 2011
http://hg.python.org/cpython/rev/da9fb61d5e1b
changeset: 69598:da9fb61d5e1b
branch: 3.1
user: Éric Araujo <merwok at netwok.org>
date: Thu Apr 14 03:49:19 2011 +0200
summary:
Fix improper tests in RegisterTestCase
files:
Lib/distutils/tests/test_register.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/distutils/tests/test_register.py b/Lib/distutils/tests/test_register.py
--- a/Lib/distutils/tests/test_register.py
+++ b/Lib/distutils/tests/test_register.py
@@ -137,7 +137,7 @@
# 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 @@
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 @@
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')
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list