summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Natsume <takanattie@gmail.com>2022-08-18 22:24:00 +0900
committerTakashi Natsume <takanattie@gmail.com>2022-08-18 22:39:35 +0900
commit0bd2ab5cb0020bc15f36a2614aecdc28feecbea0 (patch)
tree942c0d82121a9e9a28427c1094c7e449288749c9
parent7f2649bfb717f0f1cc077c04e206841581d6dab5 (diff)
downloadpython-swiftclient-0bd2ab5cb0020bc15f36a2614aecdc28feecbea0.tar.gz
Fix misuse of assertTrue
Replace assertTrue with assertEqual. Change-Id: Ia3524bc5b3b01c0039bede6bb172535eb85bac08 Closes-Bug: 1986948 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
-rw-r--r--test/functional/test_swiftclient.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_swiftclient.py b/test/functional/test_swiftclient.py
index 91e31af..a5c1211 100644
--- a/test/functional/test_swiftclient.py
+++ b/test/functional/test_swiftclient.py
@@ -332,7 +332,7 @@ class TestFunctional(unittest.TestCase):
resp_chunk_size=resp_chunk_size)
data = next(body)
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:
# Flush remaining data from underlying response
# (simulate a dropped connection)
@@ -369,13 +369,13 @@ class TestFunctional(unittest.TestCase):
hdrs, body = self.conn.get_object(self.containername, self.objectname)
data = body
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,
resp_chunk_size=0)
data = body
self.assertEqual(self.test_data, data)
- self.assertTrue(1, self.conn.attempts)
+ self.assertEqual(1, self.conn.attempts)
def test_post_account(self):
self.conn.post_account({'x-account-meta-data': 'Something'})