Skip to content

Commit

Permalink
fix assertions in test_adaptive.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-keller committed Dec 15, 2024
1 parent 93eddbf commit 4aacda4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_adaptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def test_max_rate_updated_on_success_response(self):
self.rate_adjustor.success_received.return_value = 20
self.rate_clocker.record.return_value = 21
await rate_limiter.on_receiving_response()
assert await self.token_bucket.set_max_rate.called_with(20)
self.token_bucket.set_max_rate.assert_called_with(20)

async def test_max_rate_cant_exceed_20_percent_max(self):
rate_limiter = self.create_client_limiter()
Expand All @@ -89,7 +89,7 @@ async def test_max_rate_cant_exceed_20_percent_max(self):

# The most we should go up is 2.0 * 20
await rate_limiter.on_receiving_response()
assert await self.token_bucket.set_max_rate.called_with(2.0 * 20)
self.token_bucket.set_max_rate.assert_called_with(2.0 * 20)


class TestAsyncTokenBucket:
Expand Down

0 comments on commit 4aacda4

Please sign in to comment.