forked from Github-Mirrors/canaille
Merge branch 'fix-intruder-lockout-test' into 'main'
fix: Fixed intruder lockout test sometimes failing with LDAP See merge request yaal/canaille!206
This commit is contained in:
commit
0a900cfd30
1 changed files with 2 additions and 2 deletions
|
@ -795,10 +795,10 @@ def test_missing_client_id(
|
||||||
def test_logout_login_with_intruder_lockout(testclient, logged_user, client, backend):
|
def test_logout_login_with_intruder_lockout(testclient, logged_user, client, backend):
|
||||||
testclient.app.config["CANAILLE"]["ENABLE_INTRUDER_LOCKOUT"] = True
|
testclient.app.config["CANAILLE"]["ENABLE_INTRUDER_LOCKOUT"] = True
|
||||||
|
|
||||||
# add 100 milliseconds to account for LDAP time
|
# add 500 milliseconds to account for LDAP time
|
||||||
with time_machine.travel(
|
with time_machine.travel(
|
||||||
datetime.datetime.now(datetime.timezone.utc)
|
datetime.datetime.now(datetime.timezone.utc)
|
||||||
+ datetime.timedelta(milliseconds=100),
|
+ datetime.timedelta(milliseconds=500),
|
||||||
tick=False,
|
tick=False,
|
||||||
) as traveller:
|
) as traveller:
|
||||||
res = testclient.get(
|
res = testclient.get(
|
||||||
|
|
Loading…
Reference in a new issue