- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 91 for johndoe (0.05 sec)
-
tests/test_response_model_data_filter_no_inheritance.py
response = client.post( "/users", json={"email": "johndoe@example.com", "password": "secret"} ) assert response.json() == {"email": "johndoe@example.com"} def test_filter_second_level_model(): response = client.get("/pets/1") assert response.json() == { "name": "Nibbler", "owner": {"email": "johndoe@example.com"}, } def test_list_of_models():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_an_py310.py
response = client.post("/token", data={"username": "johndoe", "password": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"access_token": "johndoe", "token_type": "bearer"} @needs_py310 def test_login_incorrect_password(client: TestClient): response = client.post( "/token", data={"username": "johndoe", "password": "incorrect"} )
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
response = client.post("/token", data={"username": "johndoe", "password": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"access_token": "johndoe", "token_type": "bearer"} @needs_py310 def test_login_incorrect_password(client: TestClient): response = client.post( "/token", data={"username": "johndoe", "password": "incorrect"} )
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_tutorial005.py
def test_login(): response = client.post("/token", data={"username": "johndoe", "password": "secret"}) assert response.status_code == 200, response.text content = response.json() assert "access_token" in content assert content["token_type"] == "bearer" def test_login_incorrect_password(): response = client.post( "/token", data={"username": "johndoe", "password": "incorrect"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
docs_src/security/tutorial003_an.py
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from pydantic import BaseModel from typing_extensions import Annotated fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "johndoe@example.com", "hashed_password": "fakehashedsecret", "disabled": False, }, "alice": { "username": "alice",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0) -
docs_src/security/tutorial003_an_py39.py
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from pydantic import BaseModel fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "johndoe@example.com", "hashed_password": "fakehashedsecret", "disabled": False, }, "alice": { "username": "alice",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0) -
tests/test_response_model_data_filter.py
response = client.post( "/users", json={"email": "johndoe@example.com", "password": "secret"} ) assert response.json() == {"email": "johndoe@example.com"} def test_filter_second_level_model(): response = client.get("/pets/1") assert response.json() == { "name": "Nibbler", "owner": {"email": "johndoe@example.com"}, } def test_list_of_models():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.7K bytes - Viewed (0) -
tests/test_security_oauth2_optional.py
def test_strict_login_correct_data(): response = client.post( "/login", data={"username": "johndoe", "password": "secret", "grant_type": "password"}, ) assert response.status_code == 200 assert response.json() == { "grant_type": "password", "username": "johndoe", "password": "secret", "scopes": [], "client_id": None, "client_secret": None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.8K bytes - Viewed (0) -
docs_src/security/tutorial004_an_py39.py
SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7" ALGORITHM = "HS256" ACCESS_TOKEN_EXPIRE_MINUTES = 30 fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "johndoe@example.com", "hashed_password": "$2b$12$EixZaYVK1fsbw1ZfbX3OXePaWxn96p36WQoeG6Lruj3vjPGga31lW", "disabled": False, } }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003.py
def test_login(): response = client.post("/token", data={"username": "johndoe", "password": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"access_token": "johndoe", "token_type": "bearer"} def test_login_incorrect_password(): response = client.post( "/token", data={"username": "johndoe", "password": "incorrect"} ) assert response.status_code == 400, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8K bytes - Viewed (0)