Skip to content

Commit

Permalink
✅Test : 게시물 공유 api의 no api 테스트 케이스 수정 #12
Browse files Browse the repository at this point in the history
- flake8에 의해 사용되지 않는 변수 오류가 발생됨.

Related to #12
  • Loading branch information
Chestnut90 committed Oct 29, 2023
1 parent 77178c9 commit 66ad105
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shares/tests/test_shares_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class SharesAPITestCase(APITestCase):
viewname = "shares"

def test_post_failure_no_api(self):
path = reverse(self.viewname, kwargs={"content_id": None})
"""
해당 view가 없으면 NoReverseMatch 예외가 수반됩니다.
"""
reverse(self.viewname, kwargs={"content_id": None})

def test_post_without_auth(self):
"""
Expand Down Expand Up @@ -46,7 +49,6 @@ def test_post_with_auth(self):
path=reverse(self.viewname, kwargs={"content_id": post.content_id}),
data=None,
)

self.assertEqual(response.status_code, status.HTTP_200_OK) # status 200

post_after_response = Post.objects.get(content_id=post.content_id)
Expand Down

0 comments on commit 66ad105

Please sign in to comment.