From 6fd523947a60f54d574b538cce8ac18be587c59b Mon Sep 17 00:00:00 2001 From: Takashi Natsume Date: Wed, 17 Aug 2022 18:04:45 +0900 Subject: [PATCH] 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 --- test/unit/obj/test_reconstructor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/obj/test_reconstructor.py b/test/unit/obj/test_reconstructor.py index 1fe25c2cc3..7d698d2fdf 100644 --- a/test/unit/obj/test_reconstructor.py +++ b/test/unit/obj/test_reconstructor.py @@ -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))