- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 270 for MyTest (0.06 sec)
-
docs/ja/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 Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.8K bytes - Viewed (0) -
tests/test_computed_fields.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from .utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): app = FastAPI() from pydantic import BaseModel, computed_field class Rectangle(BaseModel): width: int length: int @computed_field @property def area(self) -> int:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_an_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.header_params.tutorial002_an_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_tutorial003.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 167 bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.header_params.tutorial003_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.3K bytes - Viewed (0) -
docs/ru/docs/tutorial/testing.md
## Запуск тестов Далее Вам нужно установить `pytest`: <div class="termy"> ```console $ pip install pytest ---> 100% ``` </div> Он автоматически найдёт все файлы и тесты, выполнит их и предоставит Вам отчёт о результатах тестирования. Запустите тесты командой `pytest` и увидите результат: <div class="termy"> ```console $ pytest
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.2K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_py310.py
client = TestClient(app) with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/items/foo/ws"): pytest.fail( "did not raise WebSocketDisconnect on __enter__" ) # pragma: no cover @needs_py310 def test_websocket_invalid_data(app: FastAPI): client = TestClient(app) with pytest.raises(WebSocketDisconnect):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_an_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.header_params.tutorial003_an_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.3K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py
import pytest from fastapi.exceptions import ResponseValidationError from fastapi.testclient import TestClient from ..utils import needs_pydanticv1 @pytest.fixture(name="client") def get_client(): from .app_pv1 import app client = TestClient(app) return client @needs_pydanticv1 def test_filter_sub_model(client: TestClient): response = client.get("/model/modelA")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.5K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_04_py310.py
import pytest from fastapi.exceptions import FastAPIError from ...utils import needs_py310 @needs_py310 def test_invalid_response_model(): with pytest.raises(FastAPIError): from docs_src.response_model.tutorial003_04_py310 import app
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 10 16:22:47 UTC 2023 - 289 bytes - Viewed (0)