Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweets.tests double function test_tweet_list() #4

Open
mandrianova opened this issue Jun 20, 2020 · 0 comments
Open

tweets.tests double function test_tweet_list() #4

mandrianova opened this issue Jun 20, 2020 · 0 comments

Comments

@mandrianova
Copy link

def test_tweet_list(self):
and
def test_tweet_list(self):

Hello, thanks so much for this course. But I noticed a strange thing with the function test_tweet_list() in the class TweetTestCase().

Also, I had problems with ids for test objects and I changed all functions for tests without using ids. It is ok? For example test_action_like():

def test_action_like(self):
        client = self.get_client()
        tweet = Tweet.objects.filter(user=self.user).first()
        response = client.post("/api/tweets/action/", {"id": tweet.id, "action": "like"})
        self.assertEqual(response.status_code, 200)
        like_count = response.json().get("likes")
        self.assertEqual(like_count, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant