Skip to content

Commit

Permalink
fix: change test code
Browse files Browse the repository at this point in the history
  • Loading branch information
ljy2855 committed Jan 25, 2024
1 parent b8fcf5c commit 0aebc6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/apply/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
from rest_framework import status
from django.urls import reverse
from rest_framework.authtoken.models import Token
from django.contrib.auth.models import User
from django.contrib.auth import get_user_model


class GetRecruitSessionTest(APITestCase):
def test_get_recruit_session(self):
# 필요한 경우, 여기에 테스트를 위한 데이터 셋업을 진행합니다.

url = reverse('get_recuit_session') # 이 부분은 실제 뷰의 URL에 맞게 수정해야 합니다.
url = reverse('get_recuit_session') # 이제 이 이름을 사용할 수 있습니다.
response = self.client.get(url)

self.assertEqual(response.status_code, status.HTTP_200_OK)
# 추가적인 응답 데이터 검증을 여기에 추가할 수 있습니다.


class ResumeAPITest(APITestCase):
def setUp(self):
User = get_user_model()
self.user = User.objects.create_user(username='testuser', password='12345')
self.client.force_authenticate(user=self.user)

Expand Down
8 changes: 4 additions & 4 deletions app/apply/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from apply.views import *

urlpatterns = [
path('recruit',get_recuit_session),
path('resume', ResumeAPI.as_view()),
path('interview',get_interview_time_list),
path('result',get_result),
path('recruit/', get_recuit_session, name='get_recuit_session'),
path('resume/', ResumeAPI.as_view(), name='resume_api'),
path('interview/', get_interview_time_list, name='get_interview_time_list'),
path('result/', get_result, name='get_result'),
]

0 comments on commit 0aebc6c

Please sign in to comment.