Skip to content

Commit

Permalink
<FEAT>: potatoes/views/MyPotatoDetail 테스트 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
NohSungwoo committed Jul 30, 2024
1 parent b6cf612 commit 7738547
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions potato_project/potatoes/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@ def test_get_my_potato_not_found(self):
response_data["detail"], "Authentication credentials were not provided."
)

def test_get_my_potato_no_potatoes(self):
# 감자를 모두 삭제하여 유저가 감자를 가지고 있지 않도록 설정
Potato.objects.filter(user=self.user).delete()
response = self.client.get(self.url)

# 응답 코드 확인
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)

# 응답 데이터 확인
response_data = response.json()
self.assertEqual(response_data["error"], "object가 존재하지 않습니다")


if __name__ == "__main__":
unittest.main()

0 comments on commit 7738547

Please sign in to comment.