- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 225 for p3_test (0.1 sec)
-
tests/test_tutorial/test_header_param_models/test_tutorial002.py
pytest.param("tutorial002_an_py39", marks=[needs_py39, needs_pydanticv2]), pytest.param("tutorial002_an_py310", marks=[needs_py310, needs_pydanticv2]), pytest.param("tutorial002_pv1", marks=[needs_pydanticv1, needs_pydanticv1]), pytest.param("tutorial002_pv1_py310", marks=[needs_py310, needs_pydanticv1]), pytest.param("tutorial002_pv1_an", marks=[needs_pydanticv1]),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 9.5K bytes - Viewed (0) -
tests/utils.py
import sys import pytest from fastapi._compat import PYDANTIC_V2 needs_py39 = pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9+") needs_py310 = pytest.mark.skipif( sys.version_info < (3, 10), reason="requires python3.10+" ) needs_pydanticv2 = pytest.mark.skipif(not PYDANTIC_V2, reason="requires Pydantic v2")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 422 bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_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_websockets/test_tutorial002_an.py
def test_websocket_no_credentials(): 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 def test_websocket_invalid_data(): 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.6K bytes - Viewed (0) -
tests/test_tutorial/test_query_param_models/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from inline_snapshot import snapshot from tests.utils import needs_py39, needs_py310 @pytest.fixture( name="client", params=[ "tutorial001", pytest.param("tutorial001_py39", marks=needs_py39), pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 9.2K bytes - Viewed (0) -
tests/test_tutorial/test_header_param_models/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from inline_snapshot import snapshot from tests.utils import needs_py39, needs_py310 @pytest.fixture( name="client", params=[ "tutorial001", pytest.param("tutorial001_py39", marks=needs_py39), pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 8.7K bytes - Viewed (0) -
tests/test_ambiguous_params.py
import pytest from fastapi import Depends, FastAPI, Path from fastapi.param_functions import Query from fastapi.testclient import TestClient from fastapi.utils import PYDANTIC_V2 from typing_extensions import Annotated app = FastAPI() def test_no_annotated_defaults(): with pytest.raises( AssertionError, match="Path parameters cannot have a default value" ): @app.get("/items/{item_id}/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 12 00:22:47 UTC 2023 - 2.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/testing.md
Com ele, você pode usar o <a href="https://docs.pytest.org/" class="external-link" target="_blank">pytest</a> diretamente com **FastAPI**. ## Usando `TestClient` /// info | "Informação"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.9K 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 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial001.py
default_registry.dispose() @pytest.fixture( name="client", params=[ "tutorial001", pytest.param("tutorial001_py39", marks=needs_py39), pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an", pytest.param("tutorial001_an_py39", marks=needs_py39), pytest.param("tutorial001_an_py310", marks=needs_py310), ], )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 14.8K bytes - Viewed (0)