- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 901 for mytest (0.03 sec)
-
docs/zh/docs/tutorial/testing.md
/// ## 运行起来 之后,你只需要安装 `pytest`: <div class="termy"> ```console $ pip install pytest ---> 100% ``` </div> 他会自动检测文件和测试,执行测试,然后向你报告结果。 执行测试: <div class="termy"> ```console $ pytest ================ test session starts ================ platform linux -- Python 3.6.9, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 5.9K bytes - Viewed (0) -
tests/test_security_scopes_sub_dependency.py
# Ref: https://github.com/fastapi/fastapi/discussions/6024#discussioncomment-8541913 from typing import Annotated import pytest from fastapi import Depends, FastAPI, Security from fastapi.security import SecurityScopes from fastapi.testclient import TestClient @pytest.fixture(name="call_counts") def call_counts_fixture(): return { "get_db_session": 0, "get_current_user": 0, "get_user_me": 0,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.9K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ pytest.param("tutorial007_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module( f"docs_src.path_operation_advanced_configuration.{request.param}" ) client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 3.4K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an_py39", pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.3K bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
import gzip import importlib import json import pytest from fastapi import Request 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), pytest.param("tutorial001_an_py39"), pytest.param("tutorial001_an_py310", marks=needs_py310), ],
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.3K bytes - Viewed (0) -
docs/ko/docs/tutorial/testing.md
/// ## 실행하기 테스트 코드를 작성하고, `pytest` 를 설치해야합니다. [virtual environment](../virtual-environments.md){.internal-link target=_blank} 를 만들고, 활성화 시킨 뒤에 설치하세요. 예시: <div class="termy"> ```console $ pip install pytest ---> 100% ``` </div> `pytest` 파일과 테스트를 자동으로 감지하고 실행한 다음, 결과를 보고할 것입니다. 테스트를 다음 명령어로 실행하세요. <div class="termy">Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 7.6K bytes - Viewed (0) -
tests/test_request_params/test_form/test_optional_list.py
"type": "object", } @pytest.mark.parametrize( "path", ["/optional-list-str", "/model-optional-list-str"], ) def test_optional_list_str_missing(path: str): client = TestClient(app) response = client.post(path) assert response.status_code == 200, response.text assert response.json() == {"p": None} @pytest.mark.parametrize( "path",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.9K bytes - Viewed (0) -
docs/pt/docs/advanced/async-tests.md
## Executá-lo { #run-it } Você pode executar os seus testes normalmente via: <div class="termy"> ```console $ pytest ---> 100% ``` </div> ## Em Detalhes { #in-detail } O marcador `@pytest.mark.anyio` informa ao pytest que esta função de teste deve ser invocada de maneira assíncrona: {* ../../docs_src/async_tests/app_a_py39/test_main.py hl[7] *} /// tip | DicaRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.5K bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial002.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.events.tutorial002_py39 import app yield app def test_events(app: FastAPI): with TestClient(app) as client: response = client.get("/items/") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial005.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial005_py39"), pytest.param("tutorial005_py310", marks=needs_py310), pytest.param("tutorial005_an_py39"), pytest.param("tutorial005_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.5K bytes - Viewed (0)