feat: integrate idpyoidc server into app lifespan
This commit is contained in:
parent
2426e0675c
commit
95d184ce0f
2 changed files with 33 additions and 0 deletions
14
tests/test_oidc/test_app_integration.py
Normal file
14
tests/test_oidc/test_app_integration.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from httpx import AsyncClient
|
||||
|
||||
|
||||
async def test_oidc_server_on_app_state(client: AsyncClient) -> None:
|
||||
app = client._transport.app # type: ignore[union-attr]
|
||||
assert hasattr(app.state, "oidc_server")
|
||||
assert app.state.oidc_server is not None
|
||||
|
||||
|
||||
async def test_manage_client_registered(client: AsyncClient) -> None:
|
||||
app = client._transport.app # type: ignore[union-attr]
|
||||
oidc_server = app.state.oidc_server
|
||||
settings = app.state.settings
|
||||
assert settings.manage_client_id in oidc_server.context.cdb
|
||||
Loading…
Add table
Add a link
Reference in a new issue