fix: repair login endpoint registration in auth router
This commit is contained in:
@@ -22,7 +22,7 @@ class TestUserAuthentication:
|
||||
}
|
||||
with patch("backend.routers.auth.get_ldap_config", return_value=ldap_config):
|
||||
response = test_client.post(
|
||||
"/auth/login",
|
||||
"/users/login",
|
||||
json={"username": "testuser", "password": "password123"}
|
||||
)
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
@@ -46,7 +46,7 @@ class TestUserAuthentication:
|
||||
patch("backend.routers.auth.ldap3.Server"), \
|
||||
patch("backend.routers.auth.ldap3.Connection", side_effect=Exception("Invalid credentials")):
|
||||
response = test_client.post(
|
||||
"/auth/login",
|
||||
"/users/login",
|
||||
json={"username": "testuser", "password": "wrongpassword"}
|
||||
)
|
||||
assert response.status_code == status.HTTP_401_UNAUTHORIZED
|
||||
@@ -67,7 +67,7 @@ class TestUserAuthentication:
|
||||
test_db.commit()
|
||||
|
||||
response = test_client.post(
|
||||
"/auth/login",
|
||||
"/users/login",
|
||||
json={"username": "localuser", "password": "password123"}
|
||||
)
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
|
||||
Reference in New Issue
Block a user