- Sort Score
- Result 10 results
- Languages All
Results 161 - 170 of 1,176 for asdict (0.14 sec)
-
tests/test_tutorial/test_dependencies/test_tutorial004_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial006_an.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.dependencies.tutorial006_an import app client = TestClient(app) def test_get_no_headers(): response = client.get("/items/") assert response.status_code == 422, response.text assert response.json() == IsDict( { "detail": [ { "type": "missing",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5K bytes - Viewed (0) -
tests/test_dependency_duplicates.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial011_an.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.query_params_str_validations.tutorial011_an import app client = TestClient(app) def test_multi_query_values(): url = "/items/?q=foo&q=bar" response = client.get(url) assert response.status_code == 200, response.text assert response.json() == {"q": ["foo", "bar"]} def test_query_no_values(): url = "/items/"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial006_py310.py
"description": IsDict( { "title": "Description", "anyOf": [{"type": "string"}, {"type": "null"}], } ) | IsDict( # TODO: remove when deprecating Pydantic v1
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 6.2K bytes - Viewed (0) -
tests/test_additional_properties_bool.py
from typing import Union from dirty_equals import IsDict from fastapi import FastAPI from fastapi._compat import PYDANTIC_V2 from fastapi.testclient import TestClient from pydantic import BaseModel, ConfigDict class FooBaseModel(BaseModel): if PYDANTIC_V2: model_config = ConfigDict(extra="forbid") else: class Config: extra = "forbid" class Foo(FooBaseModel): pass
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_header_params/test_tutorial001_an_py310.py
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
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_query_params_str_validations/test_tutorial011_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.query_params_str_validations.tutorial011_an_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_tutorial/test_handling_errors/test_tutorial005.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial005 import app client = TestClient(app) def test_post_validation_error(): response = client.post("/items/", json={"title": "towel", "size": "XL"}) assert response.status_code == 422, response.text assert response.json() == IsDict( { "detail": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4.3K bytes - Viewed (0)