mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-30 10:12:37 +02:00
change method to find login_throttler
that was triggering a lot of deprecation warnings due to iterating over all known objects.
This commit is contained in:
parent
69a1ad6685
commit
44fa1af375
1 changed files with 2 additions and 5 deletions
|
@ -494,12 +494,9 @@ class BudgetTestCase(IhatemoneyTestCase):
|
||||||
resp.data.decode("utf-8"),
|
resp.data.decode("utf-8"),
|
||||||
)
|
)
|
||||||
# Change throttling delay
|
# Change throttling delay
|
||||||
import gc
|
from ihatemoney.web import login_throttler
|
||||||
|
|
||||||
for obj in gc.get_objects():
|
login_throttler._delay = 0.005
|
||||||
if isinstance(obj, utils.LoginThrottler):
|
|
||||||
obj._delay = 0.005
|
|
||||||
break
|
|
||||||
# Wait for delay to expire and retry logging in
|
# Wait for delay to expire and retry logging in
|
||||||
sleep(1)
|
sleep(1)
|
||||||
resp = self.client.post(
|
resp = self.client.post(
|
||||||
|
|
Loading…
Reference in a new issue