- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for testi (0.03 sec)
-
tests/test_annotated.py
def test_multiple_path(): app = FastAPI() @app.get("/test1") @app.get("/test2") async def test(var: Annotated[str, Query()] = "bar"): return {"foo": var} client = TestClient(app) response = client.get("/test1") assert response.status_code == 200 assert response.json() == {"foo": "bar"} response = client.get("/test1", params={"var": "baz"}) assert response.status_code == 200
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.6K bytes - Viewed (0) -
requirements-tests.txt
-e .[all] -r requirements-docs-tests.txt pytest >=7.1.3,<9.0.0 coverage[toml] >= 6.5.0,< 8.0 mypy ==1.14.1 dirty-equals ==0.9.0 sqlmodel==0.0.27 flask >=1.1.2,<4.0.0 strawberry-graphql >=0.200.0,< 1.0.0 anyio[trio] >=3.2.1,<5.0.0 PyJWT==2.9.0 pyyaml >=5.3.1,<7.0.0 pwdlib[argon2] >=0.2.1 inline-snapshot>=0.21.1 pytest-codspeed==4.2.0 # types types-ujson ==5.10.0.20240515
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 394 bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002.py
path = tmp_path / "test.txt" path.write_bytes(b"<file content>") path2 = tmp_path / "test2.txt" path2.write_bytes(b"<file content2>") client = TestClient(app) with path.open("rb") as file, path2.open("rb") as file2: response = client.post( "/files/", files=( ("files", ("test.txt", file)), ("files", ("test2.txt", file2)),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8.2K bytes - Viewed (0) -
.github/workflows/test.yml
requirements**.txt pyproject.toml - name: Install Dependencies run: uv pip install -r requirements-tests.txt - run: mkdir coverage - name: Test if: matrix.codspeed != 'codspeed' run: bash scripts/test.sh env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 08:53:59 UTC 2025 - 4.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
"msg": "Field required", "input": None, }, ] } def test_post_files_and_token(tmp_path, app: FastAPI): patha = tmp_path / "test.txt" pathb = tmp_path / "testb.txt" patha.write_text("<file content>") pathb.write_text("<file b content>") client = TestClient(app) with patha.open("rb") as filea, pathb.open("rb") as fileb:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.3K bytes - Viewed (0) -
tests/test_pydantic_v1_error.py
import sys import warnings from typing import Union import pytest from tests.utils import skip_module_if_py_gte_314 if sys.version_info >= (3, 14): skip_module_if_py_gte_314() from fastapi import FastAPI from fastapi.exceptions import PydanticV1NotSupportedError with warnings.catch_warnings(): warnings.simplefilter("ignore", UserWarning) from pydantic.v1 import BaseModel
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 2.3K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001.py
} ] } def test_other_exceptions(client: TestClient): with patch("json.loads", side_effect=Exception): response = client.post("/items/", json={"test": "test2"}) assert response.status_code == 400, response.text def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.textRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 10.6K bytes - Viewed (0) -
tests/test_tutorial/test_dataclasses/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from tests.utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.dataclasses_.{request.param}") client = TestClient(mod.app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.6K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py
# See https://github.com/pydantic/pydantic/blob/80353c29a824c55dea4667b328ba8f329879ac9f/tests/test_fastapi.sh#L25-L34. **( {"deprecated": True} if PYDANTIC_VERSION_MINOR_TUPLE >= (2, 10)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.8K bytes - Viewed (0) -
docs/en/docs/index.md
</p> <p align="center"> <a href="https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank"> <img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test"> </a> <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi" target="_blank"> <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Coverage">
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Dec 25 11:01:37 UTC 2025 - 23.5K bytes - Viewed (0)