- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 907 for fdef (0.08 sec)
-
tests/test_tutorial/test_security/test_tutorial005.py
def test_verify_password(): assert verify_password("secret", fake_users_db["johndoe"]["hashed_password"]) def test_get_password_hash(): assert get_password_hash("secretalice") def test_create_access_token(): access_token = create_access_token(data={"data": "foo"}) assert access_token def test_token_no_sub(): response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
tests/test_datastructures.py
# TODO: remove when deprecating Pydantic v1 def test_upload_file_invalid(): with pytest.raises(ValueError): UploadFile.validate("not a Starlette UploadFile") def test_upload_file_invalid_pydantic_v2(): with pytest.raises(ValueError): UploadFile._validate("not a Starlette UploadFile", {}) def test_default_placeholder_equals(): placeholder_1 = Default("a")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_dependency_cache.py
counter_holder = {"counter": 0} async def dep_counter(): counter_holder["counter"] += 1 return counter_holder["counter"] async def super_dep(count: int = Depends(dep_counter)): return count @app.get("/counter/") async def get_counter(count: int = Depends(dep_counter)): return {"counter": count} @app.get("/sub-counter/") async def get_sub_counter(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 23 13:30:24 UTC 2022 - 2.7K bytes - Viewed (0) -
docs_src/websockets/tutorial003_py39.py
</html> """ class ConnectionManager: def __init__(self): self.active_connections: list[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket) async def send_personal_message(self, message: str, websocket: WebSocket):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 2.5K bytes - Viewed (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/UserGuideTransformTaskTest.groovy
def actual = UserGuideTransformTask.normalise(content) then: actual == "test\ntest\ntest" } def stripsLeadingWhitespaceOnSingleLine() { given: String content = " test" when: def actual = UserGuideTransformTask.normalise(content) then: actual == "test" } def preservesFormattingWithIndentedMultiline() { given:
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Tue Jul 27 19:28:51 UTC 2021 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_an_py310.py
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.security.tutorial003_an_py310 import app client = TestClient(app) return client @needs_py310 def test_login(client: TestClient): response = client.post("/token", data={"username": "johndoe", "password": "secret"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_py310.py
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.security.tutorial003_py310 import app client = TestClient(app) return client @needs_py310 def test_login(client: TestClient): response = client.post("/token", data={"username": "johndoe", "password": "secret"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.4K bytes - Viewed (0) -
disabled-Jenkinsfile
def buildOs = 'linux' def buildJdk = '17' def buildMvn = '3.8.x' def runITsOses = ['linux'] def runITsJdks = ['17', '21'] def runITsMvn = '3.8.x' def runITscommand = "mvn clean install -Prun-its,embedded -B -U -V" // -DmavenDistro=... -Dmaven.test.failure.ignore=true def tests try { def osNode = jenkinsEnv.labelForOS(buildOs)
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Mon Sep 30 14:11:55 UTC 2024 - 8.4K bytes - Viewed (0) -
bin/diff_yaml.py
import sys import yaml # pyyaml # returns fully qualified resource name of the k8s resource def by_resource_name(res): if res is None: return "" return "{}::{}::{}".format(res['apiVersion'], res['kind'], res['metadata']['name']) def keydiff(k0, k1): k0s = set(k0) k1s = set(k1) added = k1s - k0s removed = k0s - k1s
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Mar 03 16:14:57 UTC 2021 - 4.5K bytes - Viewed (0) -
docs_src/security/tutorial004_an_py39.py
app = FastAPI() def verify_password(plain_password, hashed_password): return pwd_context.verify(plain_password, hashed_password) def get_password_hash(password): return pwd_context.hash(password) def get_user(db, username: str): if username in db: user_dict = db[username] return UserInDB(**user_dict) def authenticate_user(fake_db, username: str, password: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0)