mirror of
https://github.com/fastapi/fastapi.git
synced 2026-11-21 10:13:53 +08:00
9 lines
227 B
Python
9 lines
227 B
Python
from fastapi.testclient import TestClient
|
|
|
|
|
|
def test_default_example():
|
|
from docs_src.opentelemetry.tutorial001 import app
|
|
|
|
with TestClient(app) as client:
|
|
assert client.get("/items/1").json() == {"item_id": 1}
|