- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 294 for ptrtest (0.09 sec)
-
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from docs_src.path_operation_advanced_configuration.tutorial007 import app client = TestClient(app) return client @needs_pydanticv2 def test_post(client: TestClient): yaml_data = """ name: Deadpoolio tags: - x-force - x-men
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 3.3K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_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.tutorial003_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.3K bytes - Viewed (0) -
tests/test_tutorial/test_extra_models/test_tutorial004_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.extra_models.tutorial004_py39 import app client = TestClient(app) return client @needs_py39 def test_get_items(client: TestClient): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_pydanticv1 @pytest.fixture(name="client") def get_client(): from docs_src.schema_extra_example.tutorial001_pv1 import app client = TestClient(app) return client @needs_pydanticv1 def test_post_body_example(client: TestClient): response = client.put( "/items/5", json={ "name": "Foo",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.4K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial011_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.query_params_str_validations.tutorial011_py310 import app client = TestClient(app) return client @needs_py310 def test_multi_query_values(client: TestClient): url = "/items/?q=foo&q=bar" response = client.get(url)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial011_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.query_params_str_validations.tutorial011_py39 import app client = TestClient(app) return client @needs_py39 def test_multi_query_values(client: TestClient): url = "/items/?q=foo&q=bar" response = client.get(url)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_exception_handlers.py
import pytest from fastapi import FastAPI, HTTPException from fastapi.exceptions import RequestValidationError from fastapi.testclient import TestClient from starlette.responses import JSONResponse def http_exception_handler(request, exception): return JSONResponse({"exception": "http-exception"}) def request_validation_exception_handler(request, exception): return JSONResponse({"exception": "request-validation"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Feb 17 12:40:12 UTC 2022 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001_an_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.security.tutorial001_an_py39 import app client = TestClient(app) return client @needs_py39 def test_no_token(client: TestClient): response = client.get("/items") assert response.status_code == 401, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from docs_src.schema_extra_example.tutorial001 import app client = TestClient(app) return client @needs_pydanticv2 def test_post_body_example(client: TestClient): response = client.put( "/items/5", json={ "name": "Foo",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.7K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004_py310.py
import pytest from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.response_model.tutorial004_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "url,data", [ ("/items/foo", {"name": "Foo", "price": 50.2}), (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.2K bytes - Viewed (0)