chat_back/tests/integration_tests/chat_api_test.py

9 lines
294 B
Python

from httpx import AsyncClient
async def test_get_chats(ac: AsyncClient):
await ac.post("/users/login", json={"email_or_username": "urec", "password": "12311231"})
response = await ac.get("/chat")
assert response.status_code == 200
print(response.json())
assert len(response.json()) == 2