| self = <starlette.datastructures.State object at 0x1138e71a0>, key = 'settings'
|
|
|
| def __getattr__(self, key: Any) -> Any:
|
| try:
|
| > return self._state[key]
|
| ^^^^^^^^^^^^^^^^
|
| E KeyError: 'settings'
|
|
|
| .venv/lib/python3.12/site-packages/starlette/datastructures.py:685: KeyError
|
|
|
| During handling of the above exception, another exception occurred:
|
|
|
| cpo_app_client = <httpx.AsyncClient object at 0x11382e570>, msp_app_client = <httpx.AsyncClient object at 0x1138e5d90>
|
|
|
| @pytest.mark.asyncio
|
| async def test_apps(cpo_app_client: AsyncClient, msp_app_client: AsyncClient):
|
| > response1 = await cpo_app_client.get(f'/system/information')
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
| app/tests/integration_tests/test_601_apps.py:11:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
| .venv/lib/python3.12/site-packages/httpx/_client.py:1768: in get
|
| return await self.request(
|
| .venv/lib/python3.12/site-packages/httpx/_client.py:1540: in request
|
| return await self.send(request, auth=auth, follow_redirects=follow_redirects)
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| .venv/lib/python3.12/site-packages/httpx/_client.py:1629: in send
|
| response = await self._send_handling_auth(
|
| .venv/lib/python3.12/site-packages/httpx/_client.py:1657: in _send_handling_auth
|
| response = await self._send_handling_redirects(
|
| .venv/lib/python3.12/site-packages/httpx/_client.py:1694: in _send_handling_redirects
|
| response = await self._send_single_request(request)
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| .venv/lib/python3.12/site-packages/httpx/_client.py:1730: in _send_single_request
|
| response = await transport.handle_async_request(request)
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| .venv/lib/python3.12/site-packages/httpx/_transports/asgi.py:170: in handle_async_request
|
| await self.app(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/fastapi/applications.py:1135: in __call__
|
| await super().__call__(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/applications.py:107: in __call__
|
| await self.middleware_stack(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/middleware/errors.py:186: in __call__
|
| raise exc
|
| .venv/lib/python3.12/site-packages/starlette/middleware/errors.py:164: in __call__
|
| await self.app(scope, receive, _send)
|
| .venv/lib/python3.12/site-packages/starlette/middleware/cors.py:85: in __call__
|
| await self.app(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/middleware/gzip.py:29: in __call__
|
| await responder(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/middleware/gzip.py:130: in __call__
|
| await super().__call__(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/middleware/gzip.py:46: in __call__
|
| await self.app(scope, receive, self.send_with_compression)
|
| .venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py:63: in __call__
|
| await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/_exception_handler.py:53: in wrapped_app
|
| raise exc
|
| .venv/lib/python3.12/site-packages/starlette/_exception_handler.py:42: in wrapped_app
|
| await app(scope, receive, sender)
|
| .venv/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
|
| await self.app(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/routing.py:716: in __call__
|
| await self.middleware_stack(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/routing.py:736: in app
|
| await route.handle(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/routing.py:290: in handle
|
| await self.app(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/fastapi/routing.py:115: in app
|
| await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| .venv/lib/python3.12/site-packages/starlette/_exception_handler.py:53: in wrapped_app
|
| raise exc
|
| .venv/lib/python3.12/site-packages/starlette/_exception_handler.py:42: in wrapped_app
|
| await app(scope, receive, sender)
|
| .venv/lib/python3.12/site-packages/fastapi/routing.py:101: in app
|
| response = await f(request)
|
| ^^^^^^^^^^^^^^^^
|
| .venv/lib/python3.12/site-packages/fastapi/routing.py:355: in app
|
| raw_response = await run_endpoint_function(
|
| .venv/lib/python3.12/site-packages/fastapi/routing.py:245: in run_endpoint_function
|
| return await run_in_threadpool(dependant.call, **values)
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| .venv/lib/python3.12/site-packages/starlette/concurrency.py:32: in run_in_threadpool
|
| return await anyio.to_thread.run_sync(func)
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| .venv/lib/python3.12/site-packages/anyio/to_thread.py:61: in run_sync
|
| return await get_async_backend().run_sync_in_worker_thread(
|
| .venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2525: in run_sync_in_worker_thread
|
| return await future
|
| ^^^^^^^^^^^^
|
| .venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:986: in run
|
| result = context.run(func, *args)
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
| app/routers/system_router.py:43: in get_system_information
|
| settings: Settings = request.state.settings
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| self = <starlette.datastructures.State object at 0x1138e71a0>, key = 'settings'
|
|
|
| def __getattr__(self, key: Any) -> Any:
|
| try:
|
| return self._state[key]
|
| except KeyError:
|
| message = "'{}' object has no attribute '{}'"
|
| > raise AttributeError(message.format(self.__class__.__name__, key))
|
| E AttributeError: 'State' object has no attribute 'settings'
|
|
|
| .venv/lib/python3.12/site-packages/starlette/datastructures.py:688: AttributeError
|