test: update test fixtures to use @with_session decorator

- Update conftest.py fixtures to work with new session management
- Fix WebSocket close to use await in test_transcripts_rtc_ws.py
- Align test fixtures with new @with_session decorator pattern
This commit is contained in:
2025-09-23 16:26:46 -06:00
parent 1c9e8b9cde
commit a883df0d63
2 changed files with 289 additions and 162 deletions

View File

@@ -111,11 +111,6 @@ def appserver(tmpdir, setup_database, celery_session_app, celery_session_worker)
settings.DATA_DIR = DATA_DIR
@pytest.fixture(scope="session")
def celery_includes():
return ["reflector.pipelines.main_live_pipeline"]
@pytest.mark.usefixtures("setup_database")
@pytest.mark.usefixtures("celery_session_app")
@pytest.mark.usefixtures("celery_session_worker")
@@ -164,7 +159,7 @@ async def test_transcript_rtc_and_websocket(
except Exception as e:
print(f"Test websocket: EXCEPTION {e}")
finally:
ws.close()
await ws.close()
print("Test websocket: DISCONNECTED")
websocket_task = asyncio.get_event_loop().create_task(websocket_task())