def test_case(self): from fb_post.models_utility_functions import create_post, react_to_post self.foo_user = self._create_user("username", "password") self.foo_user2 = self._create_user("username1", "password") self.post = create_post(self.foo_user2.id, "content") self.react1 = react_to_post(self.foo_user, self.post.id, "haha") self.react2 = react_to_post(self.foo_user2, self.post.id, "haha") TEST_CASE['request']['path_params']['post_id'] = self.post.id self.default_test_case()
def test_case(self): from fb_post.models_utility_functions import create_post, react_to_post self.foo_user = self._create_user("username", "password") self.foo_user2 = self._create_user("username1", "password") self.foo_user3 = self._create_user("username2", "password") self.post = create_post(self.foo_user.id, "content") self.react1 = react_to_post(self.foo_user2, self.post.id, "haha") self.react2 = react_to_post(self.foo_user, self.post.id, "love") self.react3 = react_to_post(self.foo_user3, self.post.id, "sad") TEST_CASE['request']['query_params']['offset'] = 0 TEST_CASE['request']['query_params']['limit'] = 2 TEST_CASE['request']['path_params']['post_id'] = self.post.id CustomAPITestCase.test_case_dict = TEST_CASE self.default_test_case()
def test_case(self): from fb_post.models_utility_functions import Reaction self.count_before_reaction = Reaction.objects.all().count() super(TestCase02PostReactToPostAPITestCase, self).setupUser('username', 'password') from fb_post.models_utility_functions import create_post, react_to_post self.post = create_post(self.foo_user.id, "content") self.react1 = react_to_post(self.foo_user, self.post.id, "haha") TEST_CASE['request']['path_params']['post_id'] = self.post.id self.default_test_case()
def test_case(self): from fb_post.models_utility_functions import create_post, react_to_post, add_comment, react_to_comment, \ reply_to_comment self.foo_user = self._create_user("username", "password") self.foo_user1 = self._create_user("username1", "password") self.foo_user2 = self._create_user("username2", "password") self.post = create_post(self.foo_user.id, "post content") self.react1 = react_to_post(self.foo_user1, self.post.id, "haha") self.react2 = react_to_post(self.foo_user2, self.post.id, "haha") self.comment1 = add_comment(self.post.id, self.foo_user1.id, "comment 1") self.react_to_comment1 = react_to_comment(self.foo_user, self.comment1.id, "haha") self.reply_to_comment1 = reply_to_comment(self.comment1.id, self.foo_user2.id, "reply for comment") self.react_to_comment1 = react_to_comment(self.foo_user1, self.reply_to_comment1.id, "haha") TEST_CASE['request']['path_params']['user_id'] = self.foo_user.id self.default_test_case()
def test_case(self): from fb_post.models_utility_functions import create_post, react_to_post self.foo_user = self._create_user("username", "password") self.foo_user2 = self._create_user("username1", "password") self.foo_user3 = self._create_user("username2", "password") self.foo_user4 = self._create_user("username3", "password") self.foo_user5 = self._create_user("username4", "password") self.foo_user6 = self._create_user("username5", "password") self.post = create_post(self.foo_user.id, "content") self.post2 = create_post(self.foo_user2.id, "content") self.post3 = create_post(self.foo_user3.id, "content") self.react1_for_post = react_to_post(self.foo_user2, self.post.id, "haha") self.react2_for_post = react_to_post(self.foo_user, self.post.id, "love") self.react3_for_post = react_to_post(self.foo_user3, self.post.id, "haha") self.react4_for_post = react_to_post(self.foo_user5, self.post.id, "sad") self.react1_for_post2 = react_to_post(self.foo_user2, self.post2.id, "sad") self.react2_for_post2 = react_to_post(self.foo_user, self.post2.id, "angry") self.react3_for_post2 = react_to_post(self.foo_user3, self.post.id, "haha") self.react4_for_post2 = react_to_post(self.foo_user5, self.post.id, "wow") self.react1_for_post3 = react_to_post(self.foo_user2, self.post2.id, "haha") self.react2_for_post3 = react_to_post(self.foo_user, self.post2.id, "angry") self.react3_for_post3 = react_to_post(self.foo_user4, self.post2.id, "angry") self.react4_for_post3 = react_to_post(self.foo_user5, self.post2.id, "sad") self.default_test_case()