Modify test code to be less brittle

The test for log function against ObjectRetrierWraps class is too
brittle to the number of log calls. This commit makes it less brittle.
This commit is contained in:
Alex Kavanagh
2024-07-01 20:30:05 +01:00
parent 12c69fdca3
commit b7c5b5a54d
+1 -3
View File
@@ -150,9 +150,7 @@ class TestObjectRetrierWraps(ut_utils.BaseTestCase):
with self.assertRaises(SomeException):
wrapped_a.func()
# there should be two calls; one for the single retry and one for the
# failure.
self.assertEqual(mock_log.call_count, 6)
mock_log.assert_called()
@mock.patch("time.sleep")
def test_back_off_maximum(self, mock_sleep):