- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,452 for DEF (0.01 sec)
-
tests/test_params_repr.py
"Query(Ellipsis)", ) def test_query_repr_number(): assert repr(Query(1)) == "Query(1)" def test_query_repr_list(): assert repr(Query([])) == "Query([])" def test_header_repr_str(): assert repr(Header("teststr")) == "Header(teststr)" def test_header_repr_none(): assert repr(Header(None)) == "Header(None)" def test_header_repr_ellipsis():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.3K bytes - Viewed (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/ClassDocRendererTest.groovy
def propertiesSection = withCategories { content.section.find { it.title[0].text().trim() == 'Properties' } } def propertyDetailsSection = withCategories { content.section.find { it.title[0].text().trim() == 'Property details' } } def propertiesTable = withCategories { propertiesSection ? propertiesSection.table[0] : parse('<table/>')}
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 40.8K bytes - Viewed (0) -
tests/test_response_by_alias.py
def by_alias_dict(): return {"alias": "Foo"} @app.get("/by-alias/model", response_model=Model) def by_alias_model(): return Model(alias="Foo") @app.get("/by-alias/list", response_model=List[Model]) def by_alias_list(): return [{"alias": "Foo"}, {"alias": "Bar"}] @app.get("/no-alias/dict", response_model=ModelNoAlias) def no_alias_dict(): return {"name": "Foo"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 11.1K bytes - Viewed (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild.binary-compatibility.gradle
) def compatibilityBaselineVersion = moduleIdentity.releasedVersions.get().mostRecentRelease.version def ARTIFACT_TYPE = Attribute.of('artifactType', String) def RUNTIME_ATTRIBUTE = objects.named(Usage, Usage.JAVA_RUNTIME) def DOCUMENTATION_ATTRIBUTE = objects.named(Category, Category.DOCUMENTATION) def SOURCES_ATTRIBUTE = objects.named(DocsType, "gradle-source-folders")
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Fri Jul 26 08:15:16 UTC 2024 - 9.1K bytes - Viewed (0) -
tests/test_default_response_class.py
@router_a_a.get("/") def get_a_a(): return {"msg": "Hello A A"} @router_a_a.get("/override", response_class=PlainTextResponse) def get_a_a_path_override(): return "Hello A A" @router_a_b_override.get("/") def get_a_b(): return "Hello A B" @router_a_b_override.get("/override", response_class=HTMLResponse) def get_a_b_path_override(): return "Hello A B" @router_b_override.get("/") def get_b():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5.2K bytes - Viewed (0) -
tests/test_required_noneable.py
app = FastAPI() @app.get("/query") def read_query(q: Union[str, None]): return q @app.get("/explicit-query") def read_explicit_query(q: Union[str, None] = Query()): return q @app.post("/body-embed") def send_body_embed(b: Union[str, None] = Body(embed=True)): return b client = TestClient(app) def test_required_nonable_query_invalid():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 19:08:31 UTC 2022 - 1.5K bytes - Viewed (0) -
tests/test_validate_response.py
owner_ids: Optional[List[int]] = None @app.get("/items/invalid", response_model=Item) def get_invalid(): return {"name": "invalid", "price": "foo"} @app.get("/items/invalidnone", response_model=Item) def get_invalid_none(): return None @app.get("/items/validnone", response_model=Union[Item, None]) def get_valid_none(send_none: bool = False): if send_none: return None else:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_exception_handlers.py
client = TestClient(app) @app.get("/http-exception") def route_with_http_exception(): raise HTTPException(status_code=400) @app.get("/request-validation/{param}/") def route_with_request_validation_exception(param: int): pass # pragma: no cover @app.get("/server-error") def route_with_server_error(): raise RuntimeError("Oops!") def test_override_http_exception():
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_tutorial005_an_py39.py
from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.security.tutorial005_an_py39 import app client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ): data = {"username": username, "password": password}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_response_model_invalid.py
def read_root(): pass # pragma: nocover def test_invalid_response_model_in_responses_raises(): with pytest.raises(FastAPIError): app = FastAPI() @app.get("/", responses={"500": {"model": NonPydanticModel}}) def read_root(): pass # pragma: nocover def test_invalid_response_model_sub_type_in_responses_raises():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 29 13:04:35 UTC 2020 - 1.1K bytes - Viewed (0)