forked from extern/django-helpdesk
Fix pycodestyle errors
This commit is contained in:
parent
90621f575d
commit
2f8b4acf64
@ -1,4 +1,4 @@
|
|||||||
#queue_publii -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
@ -61,7 +61,6 @@ class KBTests(TestCase):
|
|||||||
response = self.client.get(reverse('helpdesk:kb_category', args=("test_cat",)))
|
response = self.client.get(reverse('helpdesk:kb_category', args=("test_cat",)))
|
||||||
self.assertContains(response, '1 open tickets')
|
self.assertContains(response, '1 open tickets')
|
||||||
|
|
||||||
|
|
||||||
def test_kb_vote(self):
|
def test_kb_vote(self):
|
||||||
self.client.login(username=self.user.get_username(), password='password')
|
self.client.login(username=self.user.get_username(), password='password')
|
||||||
response = self.client.get(reverse('helpdesk:kb_vote', args=(self.kbitem1.pk,)) + "?vote=up")
|
response = self.client.get(reverse('helpdesk:kb_vote', args=(self.kbitem1.pk,)) + "?vote=up")
|
||||||
@ -74,10 +73,8 @@ class KBTests(TestCase):
|
|||||||
response = self.client.get(cat_url)
|
response = self.client.get(cat_url)
|
||||||
self.assertContains(response, '0 people found this answer useful of 1')
|
self.assertContains(response, '0 people found this answer useful of 1')
|
||||||
|
|
||||||
|
|
||||||
def test_kb_category_iframe(self):
|
def test_kb_category_iframe(self):
|
||||||
cat_url = reverse('helpdesk:kb_category', args=("test_cat",)) + "?kbitem=1;submitter_email=foo@bar.cz;title=lol;"
|
cat_url = reverse('helpdesk:kb_category', args=("test_cat",)) + "?kbitem=1;submitter_email=foo@bar.cz;title=lol;"
|
||||||
response = self.client.get(cat_url)
|
response = self.client.get(cat_url)
|
||||||
# Assert that query params are passed on to ticket submit form
|
# Assert that query params are passed on to ticket submit form
|
||||||
self.assertContains(response, "'/helpdesk/tickets/submit/?queue=1;_readonly_fields_=queue;kbitem=1;submitter_email=foo%40bar.cz&title=lol")
|
self.assertContains(response, "'/helpdesk/tickets/submit/?queue=1;_readonly_fields_=queue;kbitem=1;submitter_email=foo%40bar.cz&title=lol")
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ def category(request, slug, iframe=False):
|
|||||||
'staff': staff,
|
'staff': staff,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@xframe_options_exempt
|
@xframe_options_exempt
|
||||||
def category_iframe(request, slug):
|
def category_iframe(request, slug):
|
||||||
return category(request, slug, iframe=True)
|
return category(request, slug, iframe=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user