Fix misuse of assertTrue

Fix misuse of assertTrue in
test/unit/obj/test_reconstructor.py.

Change-Id: I9c55bb16421ec85a20d3d4a0e6be43ce20c08b3c
Closes-Bug: 1986776
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
Takashi Natsume 2022-08-17 18:04:45 +09:00
parent 9abee0e784
commit 6fd523947a

View File

@ -1246,7 +1246,7 @@ class TestGlobalSetupObjectReconstructor(unittest.TestCase):
self.reconstructor.reconstruct()
for context in ssync_calls:
if context['job']['job_type'] == REVERT:
self.assertTrue(True, context.get('include_non_durable'))
self.assertTrue(context.get('include_non_durable'))
data_file_tail = ('#%s.data'
% context['node']['index'])
for dirpath, files in visit_obj_dirs(context):
@ -1318,7 +1318,7 @@ class TestGlobalSetupObjectReconstructor(unittest.TestCase):
self.reconstructor.reconstruct()
for context in ssync_calls:
self.assertEqual(REVERT, context['job']['job_type'])
self.assertTrue(True, context.get('include_non_durable'))
self.assertTrue(context.get('include_non_durable'))
# neither nondurable should be removed yet with default commit_window
# because their mtimes are too recent
self.assertTrue(os.path.exists(datafile_recent))
@ -1337,7 +1337,7 @@ class TestGlobalSetupObjectReconstructor(unittest.TestCase):
self.reconstructor.reconstruct()
for context in ssync_calls:
self.assertEqual(REVERT, context['job']['job_type'])
self.assertTrue(True, context.get('include_non_durable'))
self.assertTrue(context.get('include_non_durable'))
# ...now the nondurables get purged
self.assertFalse(os.path.exists(datafile_recent))