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

Commit

Permalink
Update test_integration.py
Browse files Browse the repository at this point in the history
Quickfix for non-deterministic test
  • Loading branch information
yannicschroeer authored Jun 16, 2022
1 parent 33b69a8 commit 0a44447
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from fastapi_keycloak import HTTPMethod
from fastapi_keycloak.model import KeycloakRole
from tests import BaseTestClass

from time import sleep

class TestAPIIntegration(BaseTestClass):
def test_properties(self, idp):
Expand Down Expand Up @@ -58,9 +58,11 @@ def test_proxy(self, idp):
assert type(response.json()) == dict

def test_timeout(self, idp):
idp.timeout = 0.0001
timeout = 0.0001
idp.timeout = timeout
try:
idp.proxy(relative_path="/realms/Test", method=HTTPMethod.GET)
sleep(timeout)
assert False
except ReadTimeout:
assert True
Expand Down

0 comments on commit 0a44447

Please sign in to comment.