Skip to content

Commit

Permalink
Merge branch 'main' into docs/readme
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted authored Mar 4, 2024
2 parents b4c4325 + 1999ab9 commit 1869afa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from starlette.middleware.sessions import SessionMiddleware
from keycloak import KeycloakAdmin
import pytest
from testcontainers.core.waiting_utils import wait_for_logs
from keycloak_oauth import KeycloakOAuth2, User
from testcontainers.keycloak import KeycloakContainer
from fastapi.testclient import TestClient
Expand All @@ -30,7 +31,9 @@ def keycloak(self) -> Generator[KeycloakAdmin, None, None]:
container, KeycloakContainer
) # HACK: wrong type annotation in testcontainers `with_command`
container.with_bind_ports(container.port, container.port).start()
wait_for_logs(container, "Running the server in development mode.")
keycloak = container.get_client()

assert keycloak.connection.base_url == container.get_base_api_url() + "/"
keycloak.import_realm(
json.loads(Path(self.RESOURCES_PATH / "realm.json").read_bytes())
Expand Down

0 comments on commit 1869afa

Please sign in to comment.