def test_lock_locks(self): response = views.lock_comments(self.get_request(method='POST', user=self.superuser), self.get_context()) tools.assert_equals(302, response.status_code) tools.assert_true(self.comment_list.locked())
def test_moderator_required_for_lock(self): response = views.lock_comments(self.get_request(method='POST', user=self.user), self.get_context()) tools.assert_equals(302, response.status_code) tools.assert_false(self.comment_list.locked())