- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for test_login (0.22 sec)
-
tests/test_tutorial/test_security/test_tutorial003_an_py310.py
client = TestClient(app) return client @needs_py310 def test_login(client: TestClient): 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(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 8.4K bytes - Viewed (0)