diff --git a/helpdesk/tests/test_kb.py b/helpdesk/tests/test_kb.py index 4430bf17..d6c64560 100644 --- a/helpdesk/tests/test_kb.py +++ b/helpdesk/tests/test_kb.py @@ -64,20 +64,19 @@ class KBTests(TestCase): self.assertContains(response, '1 open tickets') def test_kb_vote(self): - client = Client(enforce_csrf_checks=True) - client.login(username=self.user.get_username(), + self.client.login(username=self.user.get_username(), password='password') - response = client.post( + response = self.client.post( reverse('helpdesk:kb_vote', args=(self.kbitem1.pk, "up")), params={}) cat_url = reverse('helpdesk:kb_category', args=("test_cat",)) + "?kbitem=1" self.assertRedirects(response, cat_url) - response = client.get(cat_url) + response = self.client.get(cat_url) self.assertContains(response, '1 people found this answer useful of 1') - response = client.post( + response = self.client.post( reverse('helpdesk:kb_vote', args=(self.kbitem1.pk, "down")), params={}) self.assertRedirects(response, cat_url) - response = client.get(cat_url) + response = self.client.get(cat_url) self.assertContains(response, '0 people found this answer useful of 1') def test_kb_category_iframe(self):