Skip to content

Commit

Permalink
テスト修正
Browse files Browse the repository at this point in the history
  • Loading branch information
duri0214 committed Jan 6, 2024
1 parent 4fcffbb commit 599d3d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vietnam_research/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_can_create_likes(self):

# post 'likes' then the count should be 4
response = self.client.post(
reverse('vnm:likes', kwargs={'user_id': self.user.pk, 'article_id': self.article.pk}))
reverse('vnm:likes', kwargs={'article_id': self.article.pk}))
self.assertEqual(200, response.status_code)
self.assertEqual(4, Likes.objects.filter(articles=self.article).count())

Expand All @@ -74,7 +74,7 @@ def test_can_not_create_likes_because_the_article_not_exist(self):
self.assertTrue(logged_in)

# 存在しない記事IDを指定してPOSTリクエストを送信
response = self.client.post(reverse('vnm:likes', kwargs={'article_id': 999, 'user_id': self.user.pk}))
response = self.client.post(reverse('vnm:likes', kwargs={'article_id': 999}))

# 例外が発生し、エラーとなることを確認
self.assertEqual(400, response.status_code)
Expand Down

0 comments on commit 599d3d6

Please sign in to comment.