mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Upgrade fastapi and fix tests
This commit is contained in:
2 files changed
+5
-2
No files matched your search
@@ -266,6 +266,7 @@ class TestUserLogin:
|
||||
(
|
||||
("wrong_username", "user1_password", status.HTTP_401_UNAUTHORIZED),
|
||||
("user1", "wrong_password", status.HTTP_401_UNAUTHORIZED),
|
||||
("user1", "", status.HTTP_401_UNAUTHORIZED),
|
||||
("user1", None, status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
),
|
||||
)
|
||||
@@ -284,6 +285,8 @@ class TestUserLogin:
|
||||
"username": username,
|
||||
"password": password,
|
||||
}
|
||||
if password is None:
|
||||
del login_data["password"]
|
||||
response = await unauthorized_client.post(app.url_path_for("login"), data=login_data)
|
||||
assert response.status_code == status_code
|
||||
assert "access_token" not in response.json()
|
||||
|
||||
Reference in new issue
Block a user