]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:art: Fix missing format
authorSebastián Ramírez <tiangolo@gmail.com>
Fri, 28 Dec 2018 12:11:45 +0000 (16:11 +0400)
committerSebastián Ramírez <tiangolo@gmail.com>
Fri, 28 Dec 2018 12:11:45 +0000 (16:11 +0400)
docs/src/security/tutorial003.py
tests/test_tutorial/test_security/test_tutorial003.py

index d18330e9ed635c456e170752d2a6391bd6fee3c0..32db02a074b02510210f377ac979691ce0be596f 100644 (file)
@@ -17,7 +17,7 @@ fake_users_db = {
         "email": "alice@example.com",
         "hashed_password": "fakehashedsecret2",
         "disabled": True,
-    }
+    },
 }
 
 app = FastAPI()
index 248fa0ef0e5df9b514139a38e152392f6e17ee96..ddfdf0ee26ff53995c60fc01ea79d6f74d56e26d 100644 (file)
@@ -120,7 +120,9 @@ def test_login():
 
 
 def test_login_incorrect_password():
-    response = client.post("/token", data={"username": "johndoe", "password": "incorrect"})
+    response = client.post(
+        "/token", data={"username": "johndoe", "password": "incorrect"}
+    )
     assert response.status_code == 400
     assert response.json() == {"detail": "Incorrect username or password"}
 
@@ -154,6 +156,7 @@ def test_incorrect_token():
     assert response.status_code == 400
     assert response.json() == {"detail": "Invalid authentication credentials"}
 
+
 def test_incorrect_token_type():
     response = client.get(
         "/users/me", headers={"Authorization": "Notexistent testtoken"}
@@ -161,6 +164,7 @@ def test_incorrect_token_type():
     assert response.status_code == 403
     assert response.json() == {"detail": "Not authenticated"}
 
+
 def test_inactive_user():
     response = client.get("/users/me", headers={"Authorization": "Bearer alice"})
     assert response.status_code == 400