Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions tests/test_tutorial/test_body_updates/test_tutorial001.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
import importlib

import pytest
from fastapi.testclient import TestClient

from ...utils import needs_pydanticv1, needs_pydanticv2
from ...utils import needs_py39, needs_py310, needs_pydanticv1, needs_pydanticv2


@pytest.fixture(name="client")
def get_client():
from docs_src.body_updates.tutorial001 import app
@pytest.fixture(
name="client",
params=[
"tutorial001",
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py39", marks=needs_py39),
],
)
def get_client(request: pytest.FixtureRequest):
mod = importlib.import_module(f"docs_src.body_updates.{request.param}")

client = TestClient(app)
client = TestClient(mod.app)
return client


Expand Down
317 changes: 0 additions & 317 deletions tests/test_tutorial/test_body_updates/test_tutorial001_py310.py

This file was deleted.

Loading