def test_moderated(self): response = views.moderate_comment(self.get_request(method='POST', user=self.superuser), self.get_context(), self.comment.pk) tools.assert_equals(302, response.status_code) tools.assert_equals(0, self.comment_list.count())
def test_post_required(self): response = views.moderate_comment(self.get_request(method='GET', user=self.superuser), self.get_context(), self.comment.pk) tools.assert_equals(405, response.status_code) tools.assert_equals(1, self.comment_list.count())
def test_login_required(self): response = views.moderate_comment(self.get_request(method='POST'), self.get_context(), self.comment.pk) tools.assert_equals(302, response.status_code) tools.assert_equals(1, self.comment_list.count())