- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 294 for ptrtest (0.07 sec)
-
docs/en/docs/advanced/async-tests.md
{* ../../docs_src/async_tests/test_main.py *} ## Run it You can run your tests as usual via: <div class="termy"> ```console $ pytest ---> 100% ``` </div> ## In Detail The marker `@pytest.mark.anyio` tells pytest that this test function should be called asynchronously: {* ../../docs_src/async_tests/test_main.py hl[7] *} /// tip
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:43:29 UTC 2024 - 3.8K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_04.py
import pytest from fastapi.exceptions import FastAPIError def test_invalid_response_model(): with pytest.raises(FastAPIError): from docs_src.response_model.tutorial003_04 import app
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 10 16:22:47 UTC 2023 - 236 bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002_an_py39.py
import pytest from dirty_equals import IsDict from fastapi import FastAPI from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="app") def get_app(): from docs_src.request_files.tutorial002_an_py39 import app return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client @needs_py39
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.9K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_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_py310", marks=needs_py310), "tutorial001_an", pytest.param("tutorial001_an_py39", marks=needs_py39),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.header_params.tutorial002_an import app client = TestClient(app) @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"strange_header": None}), ("/items", {"X-Header": "notvalid"}, 200, {"strange_header": None}), ( "/items",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001_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.tutorial001_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 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_an_py39.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.header_params.tutorial002_an_py39 import app client = TestClient(app) return client @needs_py39 @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_request_files/test_tutorial003_an_py39.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="app") def get_app(): from docs_src.request_files.tutorial003_an_py39 import app return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client file_required = { "detail": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.header_params.tutorial001_an import app client = TestClient(app) @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"User-Agent": "testclient"}), ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.8K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @needs_py310 @pytest.mark.parametrize( "path,cookies,expected_status,expected_response", [ ("/items", None, 200, {"ads_id": None}), ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}), ( "/items", {"ads_id": "ads_track", "session": "cookiesession"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0)