Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit 0a44447

Browse files
Update test_integration.py
Quickfix for non-deterministic test
1 parent 33b69a8 commit 0a44447

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_integration.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from fastapi_keycloak import HTTPMethod
1010
from fastapi_keycloak.model import KeycloakRole
1111
from tests import BaseTestClass
12-
12+
from time import sleep
1313

1414
class TestAPIIntegration(BaseTestClass):
1515
def test_properties(self, idp):
@@ -58,9 +58,11 @@ def test_proxy(self, idp):
5858
assert type(response.json()) == dict
5959

6060
def test_timeout(self, idp):
61-
idp.timeout = 0.0001
61+
timeout = 0.0001
62+
idp.timeout = timeout
6263
try:
6364
idp.proxy(relative_path="/realms/Test", method=HTTPMethod.GET)
65+
sleep(timeout)
6466
assert False
6567
except ReadTimeout:
6668
assert True

0 commit comments

Comments
 (0)