-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
1 changed file
with
18 additions
and
4 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,13 +1,27 @@ | ||
from rest_framework.test import APITestCase | ||
from rest_framework import status | ||
from django.urls import reverse | ||
from rest_framework.authtoken.models import Token | ||
from django.contrib.auth.models import User | ||
|
||
class RecruitmentTestCase(APITestCase): | ||
def test_get_recruit_session(self): | ||
|
||
response = self.client.get(reverse('get_recuit_session')) | ||
class GetRecruitSessionTest(APITestCase): | ||
def test_get_recruit_session(self): | ||
# 필요한 경우, 여기에 테스트를 위한 데이터 셋업을 진행합니다. | ||
|
||
url = reverse('get_recuit_session') # 이 부분은 실제 뷰의 URL에 맞게 수정해야 합니다. | ||
response = self.client.get(url) | ||
|
||
self.assertEqual(response.status_code, status.HTTP_200_OK) | ||
# 추가적인 응답 데이터 검증을 여기에 추가할 수 있습니다. | ||
|
||
class ResumeAPITest(APITestCase): | ||
def setUp(self): | ||
self.user = User.objects.create_user(username='testuser', password='12345') | ||
self.client.force_authenticate(user=self.user) | ||
|
||
self.assertIn('key', response.data) | ||
def test_get_resume(self): | ||
url = reverse('resume_api') # 이 부분은 실제 뷰의 URL에 맞게 수정해야 합니다. | ||
response = self.client.get(url) | ||
|
||
self.assertEqual(response.status_code, status.HTTP_200_OK) |