Pular para o conteúdo principal

test_hello.py (Código)

import pytest
from fastapi.testclient import TestClient
def test_hello(client: TestClient) -> None:
    response = client.get('/hello')
    assert response.status_code == 200
    assert response.json() == {'hello': 'world'}