-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add POST /client/all endpoint to list all user clients
- Loading branch information
Showing
8 changed files
with
126 additions
and
8 deletions.
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
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
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
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
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
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,24 @@ | ||
from tests.client_requests import request_list_all_clients | ||
|
||
|
||
async def test_normal(client, moderator_token, test_thirdparty_client): | ||
response = await request_list_all_clients(client, moderator_token) | ||
print(response.json()) | ||
assert response.status_code == 200 | ||
|
||
assert response.json()["pagination"] == { | ||
"page": 1, | ||
"pages": 1, | ||
"total": 1, | ||
} | ||
|
||
response_client = response.json()["list"][0] | ||
assert response_client["description"] == test_thirdparty_client.description | ||
assert response_client["reference"] == test_thirdparty_client.reference | ||
assert response_client["name"] == test_thirdparty_client.name | ||
|
||
|
||
async def test_no_permission(client, test_token): | ||
response = await request_list_all_clients(client, test_token) | ||
print(response.json()) | ||
assert response.status_code == 403 |
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
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