Merge "Fix misuse of assertTrue"
This commit is contained in:
commit
249201f7ea
@ -332,7 +332,7 @@ class TestFunctional(unittest.TestCase):
|
|||||||
resp_chunk_size=resp_chunk_size)
|
resp_chunk_size=resp_chunk_size)
|
||||||
data = next(body)
|
data = next(body)
|
||||||
self.assertEqual(self.test_data[:resp_chunk_size], data)
|
self.assertEqual(self.test_data[:resp_chunk_size], data)
|
||||||
self.assertTrue(1, self.conn.attempts)
|
self.assertEqual(1, self.conn.attempts)
|
||||||
for chunk in body.resp:
|
for chunk in body.resp:
|
||||||
# Flush remaining data from underlying response
|
# Flush remaining data from underlying response
|
||||||
# (simulate a dropped connection)
|
# (simulate a dropped connection)
|
||||||
@ -369,13 +369,13 @@ class TestFunctional(unittest.TestCase):
|
|||||||
hdrs, body = self.conn.get_object(self.containername, self.objectname)
|
hdrs, body = self.conn.get_object(self.containername, self.objectname)
|
||||||
data = body
|
data = body
|
||||||
self.assertEqual(self.test_data, data)
|
self.assertEqual(self.test_data, data)
|
||||||
self.assertTrue(1, self.conn.attempts)
|
self.assertEqual(1, self.conn.attempts)
|
||||||
|
|
||||||
hdrs, body = self.conn.get_object(self.containername, self.objectname,
|
hdrs, body = self.conn.get_object(self.containername, self.objectname,
|
||||||
resp_chunk_size=0)
|
resp_chunk_size=0)
|
||||||
data = body
|
data = body
|
||||||
self.assertEqual(self.test_data, data)
|
self.assertEqual(self.test_data, data)
|
||||||
self.assertTrue(1, self.conn.attempts)
|
self.assertEqual(1, self.conn.attempts)
|
||||||
|
|
||||||
def test_post_account(self):
|
def test_post_account(self):
|
||||||
self.conn.post_account({'x-account-meta-data': 'Something'})
|
self.conn.post_account({'x-account-meta-data': 'Something'})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user