- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 1,452 for DEF (0.05 sec)
-
build-logic/binary-compatibility/src/test/groovy/gradlebuild/binarycompatibility/rules/IncubatingInternalInterfaceAddedRuleTest.groovy
} def "#member change should not be reported"() { expect: noViolation(rule) where: member << [Mock(JApiMethod), Mock(JApiField), Mock(JApiImplementedInterface), Mock(JApiConstructor)] } def "nothing should be reported if no changes"() { expect: noViolation(rule) }
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Thu Oct 06 19:15:15 UTC 2022 - 4K bytes - Viewed (0) -
tests/test_repeated_cookie_headers.py
app = FastAPI() def set_cookie(*, response: Response): response.set_cookie("cookie-name", "cookie-value") return {} def set_indirect_cookie(*, dep: str = Depends(set_cookie)): return dep @app.get("/directCookie") def get_direct_cookie(dep: str = Depends(set_cookie)): return {"dep": dep} @app.get("/indirectCookie")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jun 13 12:44:51 UTC 2020 - 792 bytes - Viewed (0) -
tests/test_dependency_class.py
class CallableDependency: def __call__(self, value: str) -> str: return value class CallableGenDependency: def __call__(self, value: str) -> Generator[str, None, None]: yield value class AsyncCallableDependency: async def __call__(self, value: str) -> str: return value class AsyncCallableGenDependency:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 10:54:05 UTC 2020 - 3.3K bytes - Viewed (0) -
tests/test_annotated.py
@app.get("/default") async def default(foo: Annotated[str, Query()] = "foo"): return {"foo": foo} @app.get("/required") async def required(foo: Annotated[str, Query(min_length=1)]): return {"foo": foo} @app.get("/multiple") async def multiple(foo: Annotated[str, object(), Query(min_length=1)]): return {"foo": foo} @app.get("/unrelated") async def unrelated(foo: Annotated[str, object()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.2K bytes - Viewed (0) -
tests/test_regex_deprecated_params.py
from fastapi import FastAPI, Query from fastapi.testclient import TestClient from typing_extensions import Annotated from .utils import needs_py310 def get_client(): app = FastAPI() with pytest.warns(DeprecationWarning): @app.get("/items/") async def read_items( q: Annotated[str | None, Query(regex="^fixedquery$")] = None, ): if q: return f"Hello {q}"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006_an.py
from docs_src.security.tutorial006_an import app client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
tests/test_repeated_dependency_schema.py
from fastapi import Depends, FastAPI, Header, status from fastapi.testclient import TestClient app = FastAPI() def get_header(*, someheader: str = Header()): return someheader def get_something_else(*, someheader: str = Depends(get_header)): return f"{someheader}123" @app.get("/") def get_deps(dep1: str = Depends(get_header), dep2: str = Depends(get_something_else)): return {"dep1": dep1, "dep2": dep2}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.body_multiple_params.tutorial001 import app client = TestClient(app) return client def test_post_body_q_bar_content(client: TestClient): response = client.put("/items/5?q=bar", json={"name": "Foo", "price": 50.5}) assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.5K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py310.py
from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.body_multiple_params.tutorial001_an_py310 import app client = TestClient(app) return client @needs_py310 def test_post_body_q_bar_content(client: TestClient): response = client.put("/items/5?q=bar", json={"name": "Foo", "price": 50.5})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.6K 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)