-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from weaverse-techtide/dev
10:14
- Loading branch information
Showing
6 changed files
with
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import pytest | ||
from rest_framework.test import APIClient | ||
from rest_framework import status | ||
from django.utils import timezone | ||
from django.urls import reverse | ||
from datetime import timedelta | ||
|
||
import jwt | ||
import pytest | ||
from django.conf import settings | ||
from django.urls import reverse | ||
from django.utils import timezone | ||
from rest_framework import status | ||
from rest_framework.test import APIClient | ||
|
||
from accounts.models import CustomUser as User | ||
from jwtauth.models import BlacklistedToken | ||
from jwtauth.utils.token_generator import generate_access_token, generate_refresh_token | ||
from accounts.models import CustomUser as User | ||
|
||
|
||
@pytest.fixture | ||
|
@@ -56,8 +58,8 @@ def test_로그인_성공(api_client, user): | |
reverse("login"), {"email": "[email protected]", "password": "testpass123"} | ||
) | ||
# Then: 응답 상태 코드가 200이고, 액세스 토큰과 리프레시 토큰이 포함되어 있음 | ||
assert response.status_code == status.HTTP_200_OK | ||
assert "access_token" in response.data | ||
assert response.status_code == status.HTTP_302_FOUND | ||
assert "access_token" in response.cookies | ||
assert "refresh_token" in response.cookies | ||
|
||
|
||
|
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