mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-12 18:00:45 +01:00
Reverting to TestCase client
This commit is contained in:
parent
f7ca446bc9
commit
93f6123545
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user