mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Merge branch '3.0' into fix/telnet-server-connection-race-condition-3.0
This commit is contained in:
12 files changed
+108
-69
No files matched your search
@@ -297,7 +297,7 @@ class TestEthernetSwitchNodesRoutes:
|
||||
node_id=ethernet_switch["node_id"]),
|
||||
json=port_params
|
||||
)
|
||||
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
|
||||
assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT
|
||||
|
||||
|
||||
async def test_ethernet_switch_delete(
|
||||
|
||||
@@ -133,7 +133,7 @@ class TestTemplateRoutes:
|
||||
"template_type": "invalid_template_type"}
|
||||
|
||||
response = await client.post(app.url_path_for("create_template"), json=params)
|
||||
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
|
||||
assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT
|
||||
|
||||
async def test_template_update(self, app: FastAPI, client: AsyncClient) -> None:
|
||||
|
||||
|
||||
@@ -75,10 +75,10 @@ class TestUserRoutes:
|
||||
(
|
||||
("email", "user2@email.com", status.HTTP_400_BAD_REQUEST),
|
||||
("username", "user2", status.HTTP_400_BAD_REQUEST),
|
||||
("email", "invalid_email@one@two.io", status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("password", "short", status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("username", "user2@#$%^<>", status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("username", "ab", status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("email", "invalid_email@one@two.io", status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
("password", "short", status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
("username", "user2@#$%^<>", status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
("username", "ab", status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
)
|
||||
)
|
||||
async def test_user_registration_fails_when_credentials_are_taken(
|
||||
@@ -101,10 +101,10 @@ class TestUserRoutes:
|
||||
("email", "user@email.com", status.HTTP_200_OK),
|
||||
("email", "user@email.com", status.HTTP_400_BAD_REQUEST),
|
||||
("username", "user2", status.HTTP_400_BAD_REQUEST),
|
||||
("email", "invalid_email@one@two.io", status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("password", "short", status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("username", "user2@#$%^<>", status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("username", "ab", status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("email", "invalid_email@one@two.io", status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
("password", "short", status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
("username", "user2@#$%^<>", status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
("username", "ab", status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
("full_name", "John Doe", status.HTTP_200_OK),
|
||||
("password", "password123", status.HTTP_200_OK),
|
||||
("is_active", True, status.HTTP_200_OK),
|
||||
@@ -259,7 +259,7 @@ class TestUserLogin:
|
||||
(
|
||||
("wrong_username", "user1_password", status.HTTP_401_UNAUTHORIZED),
|
||||
("user1", "wrong_password", status.HTTP_401_UNAUTHORIZED),
|
||||
("user1", None, status.HTTP_422_UNPROCESSABLE_ENTITY),
|
||||
("user1", None, status.HTTP_422_UNPROCESSABLE_CONTENT),
|
||||
),
|
||||
)
|
||||
async def test_user_with_wrong_creds_doesnt_receive_token(
|
||||
|
||||
@@ -62,4 +62,4 @@ class TestVersionRoutes:
|
||||
|
||||
params = "BOUM"
|
||||
response = await client.post(app.url_path_for("check_version"), json=params)
|
||||
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
|
||||
assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT
|
||||
Reference in new issue
Block a user