aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlandos <bugs-github@antipoul.fr>2021-06-09 23:56:16 +0200
committerGlandos <bugs-github@antipoul.fr>2021-06-10 00:09:59 +0200
commit44fa1af375aaaeb3f1b105871951940fa0fa37c1 (patch)
tree578c809a1f0308f2c2613e52d24cc322e366a201
parent69a1ad66856b91c123b5484323bbd67b6e46d0a0 (diff)
downloadihatemoney-mirror-44fa1af375aaaeb3f1b105871951940fa0fa37c1.zip
ihatemoney-mirror-44fa1af375aaaeb3f1b105871951940fa0fa37c1.tar.gz
ihatemoney-mirror-44fa1af375aaaeb3f1b105871951940fa0fa37c1.tar.bz2
change method to find login_throttler
that was triggering a lot of deprecation warnings due to iterating over all known objects.
-rw-r--r--ihatemoney/tests/budget_test.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/ihatemoney/tests/budget_test.py b/ihatemoney/tests/budget_test.py
index d9da094..fe0fc44 100644
--- a/ihatemoney/tests/budget_test.py
+++ b/ihatemoney/tests/budget_test.py
@@ -494,12 +494,9 @@ class BudgetTestCase(IhatemoneyTestCase):
resp.data.decode("utf-8"),
)
# Change throttling delay
- import gc
+ from ihatemoney.web import login_throttler
- for obj in gc.get_objects():
- if isinstance(obj, utils.LoginThrottler):
- obj._delay = 0.005
- break
+ login_throttler._delay = 0.005
# Wait for delay to expire and retry logging in
sleep(1)
resp = self.client.post(