Exemple #1
0
    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())
Exemple #2
0
 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())
Exemple #3
0
 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())
Exemple #4
0
    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())
Exemple #5
0
 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())
Exemple #6
0
 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())