- Sort Score
- Result 10 results
- Languages All
Results 261 - 270 of 3,545 for getE (0.03 sec)
-
tests/test_security_api_key_query.py
user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me?key=secret") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.8K bytes - Viewed (0) -
tests/test_security_http_base_description.py
security = HTTPBase(scheme="Other", description="Other Security Scheme") @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_base(): response = client.get("/users/me", headers={"Authorization": "Other foobar"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
tests/test_security_api_key_header.py
user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me", headers={"key": "secret"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.8K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001.py
q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: dict = Depends(common_parameters)): return {"message": "Hello Users!", "params": commons}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 1.5K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_an_py310.py
async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Users!", "params": commons}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
internal/config/drive/drive.go
MaxTimeout: 30 * time.Second, } if err = config.CheckValidKeys(config.DriveSubSys, kvs, DefaultKVS); err != nil { return cfg, err } // if not set. Get default value from environment d := env.Get(EnvMaxDriveTimeout, env.Get(EnvMaxDriveTimeoutLegacy, env.Get(EnvMaxDiskTimeoutLegacy, kvs.GetWithDefault(MaxTimeout, DefaultKVS)))) if d == "" { cfg.MaxTimeout = 30 * time.Second } else { dur, _ := time.ParseDuration(d)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 3K bytes - Viewed (0) -
compat/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
assertTrue( tms.get(0) instanceof ReleaseArtifactTransformation, "We expected the release transformation and got " + tms.get(0)); assertTrue( tms.get(1) instanceof LatestArtifactTransformation, "We expected the latest transformation and got " + tms.get(1)); assertTrue( tms.get(2) instanceof SnapshotTransformation,
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 2.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
client = client.newBuilder() .cookieJar(JavaNetCookieJar(cookieManager)) .build() get(urlWithIpAddress(server, "/")) val request1 = server.takeRequest() assertThat(request1.headers["Cookie"]).isNull() get(urlWithIpAddress(server, "/")) val request2 = server.takeRequest() assertThat(request2.headers["Cookie"]).isEqualTo("a=android; b=banana") }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_py310.py
async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: dict = Depends(common_parameters)): return {"message": "Hello Users!", "params": commons}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.4K bytes - Viewed (0) -
tests/test_skip_defaults.py
y: str = "y" z: str = "z" @app.get("/", response_model=Model, response_model_exclude_unset=True) def get_root() -> ModelSubclass: return ModelSubclass(sub={}, y=1, z=0) @app.get( "/exclude_unset", response_model=ModelDefaults, response_model_exclude_unset=True ) def get_exclude_unset() -> ModelDefaults: return ModelDefaults(x=None, y="y") @app.get( "/exclude_defaults",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0)