File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import pytest
22
3- from topgg .ratelimiter import AsyncRateLimiter
3+ from topgg .ratelimiter import Ratelimiter
44
55n = 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
You can’t perform that action at this time.
0 commit comments