-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Ensure that validate tokens routes works
- Loading branch information
1 parent
8f3de30
commit e25b14a
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
|
||
from fastapi import testclient | ||
from sqlalchemy import orm | ||
|
||
from capellacollab.users import crud as users_crud | ||
from capellacollab.users import models as users_models | ||
|
||
|
||
def test_validate_tokens_routes( | ||
db: orm.Session, | ||
client: testclient.TestClient, | ||
executor_name: str, | ||
): | ||
users_crud.create_user(db, executor_name, users_models.Role.ADMIN) | ||
response = client.get("/api/v1/authentication/tokens") | ||
|
||
assert response.status_code == 200 | ||
assert response.json() == executor_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters