-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
725c17c
commit 7577503
Showing
10 changed files
with
62 additions
and
51 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -142,7 +142,7 @@ def test_retrieve_user_profile(): | |
mock_logged_in_user = UserFactory( | ||
email="[email protected]", first_name="test", last_name="test2" | ||
) | ||
user_token = mock_logged_in_user.tokens()["token"] | ||
user_token = mock_logged_in_user.tokens().token | ||
client = Client(HTTP_AUTHORIZATION=f"Bearer {user_token}") | ||
response = client.get("/v1/auth/profile/") | ||
data = response.json() | ||
|
@@ -166,7 +166,7 @@ def test_patch_profile_details(): | |
last_name="test2", | ||
groups=Group.objects.all(), | ||
) | ||
user_token = mock_logged_in_user.tokens()["token"] | ||
user_token = mock_logged_in_user.tokens().token | ||
client = Client(HTTP_AUTHORIZATION=f"Bearer {user_token}") | ||
modified_data = { | ||
"first_name": "modified_name1", | ||
|
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,14 @@ | ||
from pydantic import BaseModel | ||
|
||
|
||
class UserLogin(BaseModel): | ||
email: str | ||
first_name: str | ||
last_name: str | ||
access: str | ||
refresh: str | ||
|
||
|
||
class UserTokens(BaseModel): | ||
token: str | ||
refresh: str |
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,8 @@ | ||
from pydantic import BaseModel | ||
from typing import Dict, List | ||
|
||
|
||
class OrdersList(BaseModel): | ||
total_items: int | ||
total_amount: int | ||
products: List[Dict] |
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