Пример #1
0
    def test_deletes_post(self):
        #deleting
        post_id = self.post.id
        post_deleting_args = {'post_id' : post_id, 'token' : self.user_deleting.user_token.token}
        deleting_response = delete_post_request_impl(post_deleting_args)
        assert deleting_response['success'] is True

        #retrieving deletion
        response = deletes_request_impl(self.args)
        assert response['data']['posts'][0] == post_id
        assert response['success'] is True
Пример #2
0
    def test_deletes_group(self):
        #deleting
        group_id = self.group.id
        group_deleting_args = {'group_id' : group_id, 'token' : self.user_deleting.user_token.token}
        deleting_response = delete_group_request_impl(group_deleting_args)
        assert deleting_response['success'] is True

        #retrieving deletion
        response = deletes_request_impl(self.args)
        assert response['data']['groups'][0] == group_id
        assert response['success'] is True
Пример #3
0
    def test_deletes_comment(self):
        #deleting
        comment_id = self.comment.id
        comment_delete_args = {'comment_id' : comment_id , 'token' : self.user_deleting.user_token.token}
        deleting_response = delete_comment_request_impl(comment_delete_args)
        assert deleting_response['success'] is True

        #retrieving deletion
        response = deletes_request_impl(self.args)
        assert response['data']['comments'][0] == comment_id
        assert response['success'] is True