pre-commit-ci-lite[bot]
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
0 additions and
3 deletions
-
tests/test_tutorial/test_body/test_tutorial005.py
|
|
|
@ -4,14 +4,12 @@ import pytest |
|
|
|
from fastapi.testclient import TestClient |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture( |
|
|
|
name="client", |
|
|
|
params=[ |
|
|
|
pytest.param("tutorial005_py310"), |
|
|
|
], |
|
|
|
) |
|
|
|
|
|
|
|
def get_client(request: pytest.FixtureRequest): |
|
|
|
mod = importlib.import_module(f"docs_src.body.{request.param}") |
|
|
|
client = TestClient(mod.app) |
|
|
|
@ -28,4 +26,3 @@ def test_required_field_missing(client: TestClient): |
|
|
|
response = client.post("/items/", json={}) |
|
|
|
assert response.status_code == 200 |
|
|
|
assert response.json() == {"description": None} |
|
|
|
|
|
|
|
|