Skip to content

Commit db55a9a

Browse files
author
Andrei Neagu
committed
fixed tests due to nicegui upgrade
1 parent 860be07 commit db55a9a

File tree

1 file changed

+4
-0
lines changed
  • services/dynamic-scheduler/tests/unit/api_frontend

1 file changed

+4
-0
lines changed

services/dynamic-scheduler/tests/unit/api_frontend/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import Final
99
from unittest.mock import AsyncMock
1010

11+
import nicegui
1112
import pytest
1213
from fastapi import FastAPI, status
1314
from httpx import AsyncClient
@@ -69,6 +70,9 @@ def server_host_port() -> str:
6970

7071
@pytest.fixture
7172
def not_initialized_app(app_environment: EnvVarsDict) -> FastAPI:
73+
# forces rebuild of middleware stack on next test
74+
nicegui.app.user_middleware.clear()
75+
nicegui.app.middleware_stack = None
7276
return create_app()
7377

7478

0 commit comments

Comments
 (0)