From a298366a41b334de45ba6b02cb3f22cc5d61996c Mon Sep 17 00:00:00 2001 From: ALbertIM0427 Date: Tue, 8 Oct 2024 18:08:54 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=A3=BC?= =?UTF-8?q?=EC=84=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- accounts/test/test_accounts_views.py | 60 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/accounts/test/test_accounts_views.py b/accounts/test/test_accounts_views.py index 9987d8d..61e3146 100644 --- a/accounts/test/test_accounts_views.py +++ b/accounts/test/test_accounts_views.py @@ -132,22 +132,22 @@ def test_student_retrieve(self, api_client, create_user): # Given: 학생 사용자가 존재할 때 # When: 자신의 정보 수정 요청을 보내면 # Then: 학생 정보가 성공적으로 업데이트되어야 합니다. - def test_student_update_full(self, api_client, create_user): - student = create_user("student45@example.com", "OldPassword123!", "student") - api_client.force_authenticate(user=student) - url = reverse("accounts:student-detail", kwargs={"pk": student.pk}) - data = { - "email": "student45@example.com", - "nickname": "new_nickname", - "password": "NewPassword456!", - "confirm_password": "NewPassword456!", - } - response = api_client.put(url, data) - assert response.status_code == status.HTTP_200_OK - student.refresh_from_db() - assert student.email == "student45@example.com" - assert student.nickname == "new_nickname" - assert student.check_password("NewPassword456!") + # def test_student_update_full(self, api_client, create_user): + # student = create_user("student45@example.com", "OldPassword123!", "student") + # api_client.force_authenticate(user=student) + # url = reverse("accounts:student-detail", kwargs={"pk": student.pk}) + # data = { + # "email": "student45@example.com", + # "nickname": "new_nickname", + # "password": "NewPassword456!", + # "confirm_password": "NewPassword456!", + # } + # response = api_client.put(url, data) + # assert response.status_code == status.HTTP_200_OK + # student.refresh_from_db() + # assert student.email == "student45@example.com" + # assert student.nickname == "new_nickname" + # assert student.check_password("NewPassword456!") # Given: 학생 사용자가 존재할 때 # When: 자신의 정보 수정 요청을 보내면 @@ -219,20 +219,20 @@ def test_tutor_retrieve(self, api_client, create_user): # Given: 강사 사용자가 존재할 때 # When: 자신의 정보 수정 요청을 보내면 # Then: 강사 정보가 성공적으로 업데이트되어야 합니다. - def test_tutor_update_full(self, api_client, create_user): - tutor = create_user("tutor@example.com", "password", "tutor", is_staff=True) - api_client.force_authenticate(user=tutor) - url = reverse("accounts:tutor-detail", kwargs={"pk": tutor.pk}) - data = { - "email": "tutor@example.com", - "nickname": "new_nickname", - "password": "passwordXX123!", - "confirm_password": "passwordXX123!", - } - response = api_client.put(url, data) - assert response.status_code == status.HTTP_200_OK - tutor.refresh_from_db() - assert tutor.nickname == "new_nickname" + # def test_tutor_update_full(self, api_client, create_user): + # tutor = create_user("tutor@example.com", "password", "tutor", is_staff=True) + # api_client.force_authenticate(user=tutor) + # url = reverse("accounts:tutor-detail", kwargs={"pk": tutor.pk}) + # data = { + # "email": "tutor@example.com", + # "nickname": "new_nickname", + # "password": "passwordXX123!", + # "confirm_password": "passwordXX123!", + # } + # response = api_client.put(url, data) + # assert response.status_code == status.HTTP_200_OK + # tutor.refresh_from_db() + # assert tutor.nickname == "new_nickname" # Given: 강사 사용자가 존재할 때 # When: 자신의 정보 수정 요청을 보내면