Browse Source

apply fixture

pull/9837/head
JONEMI21 8 months ago
parent
commit
b4afab0f16
  1. 6
      tests/test_tutorial/test_query_params/test_tutorial007_py310.py

6
tests/test_tutorial/test_query_params/test_tutorial007_py310.py

@ -4,14 +4,14 @@ from fastapi.testclient import TestClient
from tests.utils import needs_py310
@pytest.fixture(name="client", marks=[needs_py310])
@pytest.fixture(name="client")
def get_client():
from docs_src.query_params.tutorial007_py310 import app
c = TestClient(app)
return c
@needs_py310
def test_foo_needy_very(client: TestClient):
response = client.get("/query/mixed-type-params?query=1&query=2&foo=bar&foo=baz")
assert response.status_code == 200
@ -22,7 +22,7 @@ def test_foo_needy_very(client: TestClient):
"sequence_mapping_int": {"foo": []},
}
@needs_py310
def test_just_string_not_scalar_mapping(client: TestClient):
response = client.get("/query/mixed-type-params?&query=2&foo=1&bar=3&foo=2&foo=baz")
assert response.status_code == 200

Loading…
Cancel
Save