import asyncio
import websockets

async def test():
    uri = "ws://127.0.0.1:8000/api/v1/ws/org/f7c3246e-1f61-4f6c-80fd-84e5611182cb?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiZGI2MDU1ZjMtMDZmMi00YWI0LWIwNGUtYzE5M2ZlYjgxOTIzIiwiZXhwIjoxNzgyMTU1MDU2fQ.QPtjXkavJfry0tJwfr6A_mzeuOcIx9oF8aY-Fi2ngj0"
    try:
        async with websockets.connect(uri) as websocket:
            print("Connected successfully!")
            await websocket.send("ping")
            res = await websocket.recv()
            print("Received:", res)
    except Exception as e:
        print("Failed:", repr(e))

asyncio.run(test())
