Commit 9d9c199d by bmedx

LMS urls cleanup for Django 1.11

- Remove usage of django.urls.patterns
- Change urls tuples to lists
- Make all string view names callables
- This is the first of several urls updates for LMS; a work in progress
parent 0255592c
......@@ -510,7 +510,7 @@ class XQueueCertInterface(object):
# for other certificates. Although both tasks use the same queue,
# we can distinguish whether the certificate was an example cert based
# on which end-point XQueue uses once the task completes.
callback_url_path = reverse('certificates.views.update_example_certificate')
callback_url_path = reverse('update_example_certificate')
try:
self._send_to_xqueue(
......
......@@ -59,7 +59,7 @@ class UpdateExampleCertificateViewTest(CacheIsolationTestCase):
description=self.DESCRIPTION,
template=self.TEMPLATE,
)
self.url = reverse('certificates.views.update_example_certificate')
self.url = reverse('update_example_certificate')
# Since rate limit counts are cached, we need to clear
# this before each test.
......
......@@ -935,7 +935,7 @@ class CertificatesViewsTests(CommonCertificatesTestCase):
def test_request_certificate_without_passing(self):
self.cert.status = CertificateStatuses.unavailable
self.cert.save()
request_certificate_url = reverse('certificates.views.request_certificate')
request_certificate_url = reverse('request_certificate')
response = self.client.post(request_certificate_url, {'course_id': unicode(self.course.id)})
self.assertEqual(response.status_code, 200)
response_json = json.loads(response.content)
......@@ -946,7 +946,7 @@ class CertificatesViewsTests(CommonCertificatesTestCase):
def test_request_certificate_after_passing(self):
self.cert.status = CertificateStatuses.unavailable
self.cert.save()
request_certificate_url = reverse('certificates.views.request_certificate')
request_certificate_url = reverse('request_certificate')
with patch('capa.xqueue_interface.XQueueInterface.send_to_queue') as mock_queue:
mock_queue.return_value = (0, "Successfully queued")
with mock_passing_grade():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment