mirror of
https://github.com/python/cpython.git
synced 2025-09-28 11:15:17 +00:00
Fix improper tests in RegisterTestCase
This commit is contained in:
parent
395ba35a92
commit
691840f218
1 changed files with 3 additions and 3 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue