- Sort Score
- Num 10 results
- Language All
Results 41 - 50 of 403 for mytest (0.33 seconds)
-
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 Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 11.5K bytes - Click Count (0) -
tests/test_request_params/test_body/test_optional_list.py
}, ], } @pytest.mark.parametrize( "path", ["/optional-list-str", "/model-optional-list-str"], ) def test_optional_list_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 Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 12.6K bytes - Click Count (0) -
docs/es/docs/tutorial/testing.md
Ejecuta las pruebas con: <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 rootdir: /home/user/code/superawesome-cli/app plugins: forked-1.1.3, xdist-1.31.0, cov-2.8.1 collected 6 items ---> 100%
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 6.1K bytes - Click Count (0) -
docs/ru/docs/tutorial/testing.md
Запустите тесты: <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 rootdir: /home/user/code/superawesome-cli/app plugins: forked-1.1.3, xdist-1.31.0, cov-2.8.1 collected 6 items ---> 100%
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 9.5K bytes - Click Count (0) -
tests/test_allow_inf_nan_in_enforcing.py
@pytest.mark.parametrize( "value,code", [ ("-1", 200), ("inf", 200), ("-inf", 200), ("nan", 200), ("0", 200), ("342", 200), ], ) def test_allow_inf_nan_param_true(value: str, code: int): response = client.post(f"/?x={value}") assert response.status_code == code, response.text @pytest.mark.parametrize( "value,code", [
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.8K bytes - Click Count (0) -
tests/test_invalid_sequence_param.py
import pytest from fastapi import FastAPI, Query from pydantic import BaseModel def test_invalid_sequence(): with pytest.raises( AssertionError, match="Query parameter 'q' must be one of the supported types", ): app = FastAPI() class Item(BaseModel): title: str @app.get("/items/") def read_items(q: list[Item] = Query(default=None)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.5K bytes - Click Count (0) -
docs/de/docs/tutorial/testing.md
<div class="termy"> ```console $ pip install pytest ---> 100% ``` </div> Es erkennt die Dateien und Tests automatisch, führt sie aus und berichtet Ihnen die Ergebnisse. Führen Sie die Tests aus, mit: <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
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 6.6K bytes - Click Count (0) -
tests/test_tutorial/test_additional_status_codes/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py310", marks=needs_py310), pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.additional_status_codes.{request.param}")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 934 bytes - Click Count (0) -
tests/test_dependency_contextmanager.py
assert state["/async_raise"] == "asyncgen raise not started" with pytest.raises(OtherDependencyError): client.get("/async_raise_other") assert state["/async_raise"] == "asyncgen raise finalized" assert "/async_raise" not in errors def test_sync_raise_other(): assert state["/sync_raise"] == "generator raise not started" with pytest.raises(OtherDependencyError): client.get("/sync_raise_other")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 11.5K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/testing.md
/// ## 執行 { #run-it } 接下來,你只需要安裝 `pytest`。 請先建立並啟用一個[虛擬環境](../virtual-environments.md),然後安裝,例如: <div class="termy"> ```console $ pip install pytest ---> 100% ``` </div> 它會自動偵測檔案與測試、執行它們,並把結果回報給你。 用以下指令執行測試: <div class="termy"> ```console $ pytest ================ test session starts ================Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 5.6K bytes - Click Count (0)