Skip to content

Commit

Permalink
feat: change test
Browse files Browse the repository at this point in the history
  • Loading branch information
ljy2855 committed Jan 25, 2024
1 parent d9693ff commit b8fcf5c
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions app/apply/tests.py
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)

0 comments on commit b8fcf5c

Please sign in to comment.