From 5ca4872e794d9600709cdee107ca53682f52775a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Mon, 16 Nov 2026 16:31:14 -0300 Subject: [PATCH] test: the test client starts the sign-in count again when the suite reaches the API's limit CI run 315 failed in label_test with the API's own 429 on /operator/login: the whole suite signs in from one address and crossed the 60 sign-ins per 15 min of app/core/auth.py. A test that did not ask for the limit now clears login_attempts once and signs in again; tests that expect the 429 still get it. Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/smoke_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/smoke_test.py b/tests/smoke_test.py index fe03581..2fc6ea2 100644 --- a/tests/smoke_test.py +++ b/tests/smoke_test.py @@ -57,6 +57,7 @@ class Client: self.operator_client=Client() self.operator_client.call('/operator/login',{'email':os.environ.get('OPERATOR_EMAIL','operator@example.test'),'password':os.environ.get('OPERATOR_PASSWORD','local-operator-only')}) return self.operator_client.call(path,body,expected=expected,method=method) + reset=False for attempt in range(20): request=Request(BASE+'/api'+path,data=None if body is None else json.dumps(body).encode(), headers=headers,method=method) @@ -71,6 +72,14 @@ class Client: # an HTML page, not the API's JSON: a fast suite waits for it. if exc.code==429 and text.lstrip().startswith('