fixing some additional reverse stuff

This commit is contained in:
Alex Barcelo 2016-10-19 15:30:37 +02:00
parent afd6ebad74
commit 91afbb9755
3 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ class TestSavingSharedQuery(TestCase):
def test_cansavequery(self):
"""Can a query be saved"""
url = reverse('helpdesk_savequery')
url = reverse('helpdesk:savequery')
self.client.login(username=get_staff_user().get_username(),
password='password')
response = self.client.post(url,

View File

@ -27,7 +27,7 @@ class TestKBDisabled(TestCase):
# however instead of using that link, we will exercise 'reverse'
# to lookup/build the URL from the ticket info we have
# http://example.com/helpdesk/view/?ticket=q1-1&email=None
response = self.client.get(reverse('helpdesk_public_view'),
response = self.client.get(reverse('helpdesk:public_view'),
{'ticket': self.ticket.ticket_for_url,
'email':self.ticket.submitter_email})
self.assertEqual(response.status_code, 200)
@ -38,7 +38,7 @@ class TestKBDisabled(TestCase):
q2 = Queue(title='Q2', slug='q2')
q2.save()
# grab the URL / params which would have been emailed out to submitter.
url = reverse('helpdesk_public_view')
url = reverse('helpdesk:public_view')
params = {'ticket': self.ticket.ticket_for_url,
'email':self.ticket.submitter_email}
# Pickup the ticket created in setup() and change its queue

View File

@ -779,7 +779,7 @@ def ticket_list(request):
query_params = json.loads(b64decode(str(saved_query.query)))
except ValueError:
# Query deserialization failed. (E.g. was a pickled query)
return HttpResponseRedirect(reverse('helpdesk_list'))
return HttpResponseRedirect(reverse('helpdesk:list'))
elif not ( 'queue' in request.GET
or 'assigned_to' in request.GET
@ -1050,7 +1050,7 @@ def run_report(request, report):
try:
query_params = json.loads(b64decode(str(saved_query.query)))
except:
return HttpResponseRedirect(reverse('helpdesk_report_index'))
return HttpResponseRedirect(reverse('helpdesk:report_index'))
report_queryset = apply_query(report_queryset, query_params)