Skip to content

Commit

Permalink
Test auth/basic_user'
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Bayart committed Jul 8, 2024
1 parent a9bd47f commit c65bdde
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/routes/test_perms.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ def test_permissions(db_api, db_dovecot, log, client, normal_user, domain_mail):
)
assert response.status_code == fastapi.status.HTTP_403_FORBIDDEN

# Si un utilisateur qui n'existe pas essaye de faire quelque chose, il
# echoue -> forbidden
response = client.get(
f"/token",
auth=("unknown", "mot de passe idiot"),
)
assert response.status_code == fastapi.status.HTTP_403_FORBIDDEN

# Sur notre domaine, un user normal a le droit (mais la mailbox n'existe pas)
# donc 404.
response = client.get(
Expand Down

0 comments on commit c65bdde

Please sign in to comment.