Skip to content

Commit df82eb3

Browse files
committed
tests: update test_ratelimiter.py
1 parent 99d4d53 commit df82eb3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_ratelimiter.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
import pytest
22

3-
from topgg.ratelimiter import AsyncRateLimiter
3+
from topgg.ratelimiter import Ratelimiter
44

55
n = period = 10
66

77

88
@pytest.fixture
9-
def limiter() -> AsyncRateLimiter:
10-
return AsyncRateLimiter(max_calls=n, period=period)
9+
def limiter() -> Ratelimiter:
10+
return Ratelimiter(max_calls=n, period=period)
1111

1212

1313
@pytest.mark.asyncio
14-
async def test_AsyncRateLimiter_calls(limiter: AsyncRateLimiter) -> None:
14+
async def test_AsyncRateLimiter_calls(limiter: Ratelimiter) -> None:
1515
for _ in range(n):
1616
async with limiter:
1717
pass
1818

19-
assert len(limiter.calls) == limiter.max_calls == n
19+
assert len(limiter._Ratelimiter__calls) == limiter._Ratelimiter__max_calls == n
2020

2121

2222
@pytest.mark.asyncio
23-
async def test_AsyncRateLimiter_timespan_property(limiter: AsyncRateLimiter) -> None:
23+
async def test_AsyncRateLimiter_timespan_property(limiter: Ratelimiter) -> None:
2424
for _ in range(n):
2525
async with limiter:
2626
pass

0 commit comments

Comments
 (0)