Skip to content

Commit

Permalink
Modify test code to be less brittle
Browse files Browse the repository at this point in the history
The test for log function against ObjectRetrierWraps class is too
brittle to the number of log calls. This commit makes it less brittle.
  • Loading branch information
ajkavanagh committed Jul 2, 2024
1 parent 7e6aba6 commit 02d8d3f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions unit_tests/utilities/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ def func(self):
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):
Expand Down

0 comments on commit 02d8d3f

Please sign in to comment.