- Sort Score
- Num 10 results
- Language All
Results 181 - 190 of 605 for c1test (0.04 seconds)
-
tests/test_tutorial/test_query_params_str_validations/test_tutorial004.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), pytest.param("tutorial004_an_py39"), pytest.param("tutorial004_an_py310", marks=needs_py310), pytest.param( "tutorial004_regex_an_py310",
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 12:45:20 GMT 2025 - 5.1K bytes - Click Count (0) -
tests/test_request_params/test_form/test_list.py
from typing import Annotated import pytest from dirty_equals import IsOneOf, IsPartialDict from fastapi import FastAPI, Form from fastapi.testclient import TestClient from pydantic import BaseModel, Field from .utils import get_body_model_name app = FastAPI() # ===================================================================================== # Without aliases @app.post("/required-list-str", operation_id="required_list_str")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:31:34 GMT 2025 - 11.7K bytes - Click Count (0) -
tests/test_tutorial/test_custom_response/test_tutorial002_tutorial003_tutorial004.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="mod_name", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial003_py39"), pytest.param("tutorial004_py39"), ], ) def get_mod_name(request: pytest.FixtureRequest) -> str: return request.param @pytest.fixture(name="client") def get_client(mod_name: str) -> TestClient:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.8K bytes - Click Count (0) -
tests/test_request_params/test_body/test_optional_str.py
}, ], } @pytest.mark.parametrize( "path", ["/optional-str", "/model-optional-str"], ) def test_optional_str_missing_empty_dict(path: str): client = TestClient(app) response = client.post(path, json={}) assert response.status_code == 200, response.text assert response.json() == {"p": None} @pytest.mark.parametrize( "path",Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 11.6K bytes - Click Count (0) -
tests/test_tutorial/test_security/test_tutorial002.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), pytest.param("tutorial002_an_py39"), pytest.param("tutorial002_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 2.2K bytes - Click Count (0) -
docs/ru/docs/advanced/async-tests.md
## Запуск тестов { #run-it } Вы можете запустить свои тесты как обычно: <div class="termy"> ```console $ pytest ---> 100% ``` </div> ## Подробнее { #in-detail } Маркер `@pytest.mark.anyio` говорит pytest, что тестовая функция должна быть вызвана асинхронно: {* ../../docs_src/async_tests/app_a_py39/test_main.py hl[7] *} /// tip | ПодсказкаCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 6.3K bytes - Click Count (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py
pytest.param("tutorial001_py310", marks=needs_py310), pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) def get_mod_name(request: pytest.FixtureRequest): return request.param @pytest.fixture(name="client") def get_client(mod_name: str):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 7.9K bytes - Click Count (0) -
tests/test_tutorial/test_testing_dependencies/test_tutorial001.py
from types import ModuleType import pytest from ...utils import needs_py310 @pytest.fixture( name="test_module", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), pytest.param("tutorial001_an_py39"), pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_test_module(request: pytest.FixtureRequest) -> ModuleType:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.4K bytes - Click Count (0) -
tests/test_tutorial/test_sql_databases/test_tutorial001.py
default_registry.dispose() @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), pytest.param("tutorial001_an_py39"), pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): clear_sqlmodel()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 14K bytes - Click Count (0) -
tests/test_tutorial/test_static_files/test_tutorial001.py
import os from pathlib import Path import pytest from fastapi.testclient import TestClient @pytest.fixture(scope="module") def client(): static_dir: Path = Path(os.getcwd()) / "static" static_dir.mkdir(exist_ok=True) sample_file = static_dir / "sample.txt" sample_file.write_text("This is a sample static file.") from docs_src.static_files.tutorial001_py39 import app with TestClient(app) as client:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.1K bytes - Click Count (0)