test update

This commit is contained in:
leehk 2025-04-18 08:14:20 +08:00
parent 5aa717aff7
commit f77d704a57

View File

@ -1,15 +1,12 @@
import pytest import pytest
import json import json
import websockets import websockets
import os
backend_host = os.getenv("BACKEND_URL", "backend-aimingmedai")
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_chatbot_integration(): async def test_chatbot_integration():
# Send a request to the chatbot endpoint # Send a request to the chatbot endpoint
url = f"ws://{backend_host}:80/ws" url = "ws://backend-aimingmedai:80/ws"
data = [{"content": "Hello"}] data = [{"content": "Hello"}]
try: try:
async with websockets.connect(url) as websocket: async with websockets.connect(url) as websocket: