diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index f326cbfa805b..2b424c7e04d8 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -51,9 +51,8 @@ def lms_link_for_certificate_web_view_test(self): mode = 'professional' self.assertEqual( - utils.get_lms_link_for_certificate_web_view(dummy_user, course_key, mode), - "//localhost:8000/certificates/user/{user_id}/course/{course_key}?preview={mode}".format( - user_id=dummy_user, + utils.get_lms_link_for_certificate_web_view(course_key, mode), + "//localhost:8000/certificates/course/{course_key}?preview={mode}".format( course_key=course_key, mode=mode ) @@ -61,9 +60,8 @@ def lms_link_for_certificate_web_view_test(self): with with_site_configuration_context(configuration={"course_org_filter": "mitX", "LMS_BASE": "dummyhost:8000"}): self.assertEqual( - utils.get_lms_link_for_certificate_web_view(dummy_user, course_key, mode), - "//dummyhost:8000/certificates/user/{user_id}/course/{course_key}?preview={mode}".format( - user_id=dummy_user, + utils.get_lms_link_for_certificate_web_view(course_key, mode), + "//dummyhost:8000/certificates/course/{course_key}?preview={mode}".format( course_key=course_key, mode=mode ) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 273301e9b8c2..6332cf0b9692 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -138,7 +138,7 @@ def get_lms_link_for_item(location, preview=False): ) -def get_lms_link_for_certificate_web_view(user_id, course_key, mode): +def get_lms_link_for_certificate_web_view(course_key, mode): """ Returns the url to the certificate web view. """ @@ -150,9 +150,8 @@ def get_lms_link_for_certificate_web_view(user_id, course_key, mode): if lms_base is None: return None - return u"//{certificate_web_base}/certificates/user/{user_id}/course/{course_id}?preview={mode}".format( + return u"//{certificate_web_base}/certificates/course/{course_id}?preview={mode}".format( certificate_web_base=lms_base, - user_id=user_id, course_id=six.text_type(course_key), mode=mode ) diff --git a/cms/djangoapps/contentstore/views/certificates.py b/cms/djangoapps/contentstore/views/certificates.py index cb176272557e..3c13e502bfbb 100644 --- a/cms/djangoapps/contentstore/views/certificates.py +++ b/cms/djangoapps/contentstore/views/certificates.py @@ -407,7 +407,6 @@ def certificates_list_handler(request, course_key_string): if has_certificate_modes: certificate_web_view_url = get_lms_link_for_certificate_web_view( - user_id=request.user.id, course_key=course_key, mode=course_modes[0] # CourseMode.modes_for_course returns default mode if doesn't find anyone. ) diff --git a/cms/djangoapps/contentstore/views/tests/test_certificates.py b/cms/djangoapps/contentstore/views/tests/test_certificates.py index 64ae391245a4..cf60e7817c5c 100644 --- a/cms/djangoapps/contentstore/views/tests/test_certificates.py +++ b/cms/djangoapps/contentstore/views/tests/test_certificates.py @@ -263,7 +263,6 @@ def test_cannot_create_certificate_if_user_has_no_write_permissions(self): @override_settings(LMS_BASE=None) def test_no_lms_base_for_certificate_web_view_link(self): test_link = get_lms_link_for_certificate_web_view( - user_id=self.user.id, course_key=self.course.id, mode='honor' ) @@ -271,10 +270,9 @@ def test_no_lms_base_for_certificate_web_view_link(self): @override_settings(LMS_BASE="lms_base_url") def test_lms_link_for_certificate_web_view(self): - test_url = "//lms_base_url/certificates/user/" \ - + str(self.user.id) + "/course/" + six.text_type(self.course.id) + '?preview=honor' + test_url = "//lms_base_url/certificates/" \ + "course/" + six.text_type(self.course.id) + '?preview=honor' link = get_lms_link_for_certificate_web_view( - user_id=self.user.id, course_key=self.course.id, mode='honor' ) diff --git a/cms/templates/js/group-configuration-details.underscore b/cms/templates/js/group-configuration-details.underscore index 8310a2a657bf..f3fd77971827 100644 --- a/cms/templates/js/group-configuration-details.underscore +++ b/cms/templates/js/group-configuration-details.underscore @@ -31,9 +31,9 @@ <% if(showGroups) { %> <% allocation = Math.floor(100 / groups.length) %> -
    +
      <% groups.each(function(group, groupIndex) { %> -
    1. +
    2. <%- group.get('name') %> <%- allocation %>%
    3. diff --git a/cms/templates/js/maintenance/force-published-course-response.underscore b/cms/templates/js/maintenance/force-published-course-response.underscore index d77059ca5311..7441413dd47c 100644 --- a/cms/templates/js/maintenance/force-published-course-response.underscore +++ b/cms/templates/js/maintenance/force-published-course-response.underscore @@ -3,7 +3,7 @@ <%- gettext('You have done a dry run of force publishing the course. Nothing has changed. Had you run it, the following course versions would have been change.') %>
      - <%= StringUtils.interpolate( + <%- StringUtils.interpolate( gettext('The published branch version, {published}, was reset to the draft branch version, {draft}.'), { published: current_versions['published-branch'], diff --git a/cms/templates/js/mock/mock-xmodule-editor.underscore b/cms/templates/js/mock/mock-xmodule-editor.underscore index cb9a59c6f5b2..d65921f3891a 100644 --- a/cms/templates/js/mock/mock-xmodule-editor.underscore +++ b/cms/templates/js/mock/mock-xmodule-editor.underscore @@ -16,13 +16,13 @@ diff --git a/cms/templates/js/publish-editor.underscore b/cms/templates/js/publish-editor.underscore index 27c4ce290274..519564f72198 100644 --- a/cms/templates/js/publish-editor.underscore +++ b/cms/templates/js/publish-editor.underscore @@ -6,13 +6,13 @@ <% _.each(xblockInfo.get('child_info').children, function(subsection) { %> <% if (subsection.isPublishable()) { %>
    4. -

      <%= subsection.get('display_name') %>

      +

      <%- subsection.get('display_name') %>

        <% _.each(subsection.get('child_info').children, function(unit) { %> <% if (unit.isPublishable()) { %>
      1. - <%= unit.get('display_name') %> + <%- unit.get('display_name') %>
      2. <% } %> <% }); %> @@ -27,7 +27,7 @@ <% _.each(xblockInfo.get('child_info').children, function(unit) { %> <% if (unit.isPublishable()) { %>
      3. - <%= unit.get('display_name') %> + <%- unit.get('display_name') %>
      4. <% } %> <% }); %> diff --git a/cms/templates/js/unit-outline.underscore b/cms/templates/js/unit-outline.underscore index b5e48f72fd32..8ea1ddf1098a 100644 --- a/cms/templates/js/unit-outline.underscore +++ b/cms/templates/js/unit-outline.underscore @@ -1,23 +1,23 @@ <% if (parentInfo) { %> -
      5. -
        -

        - - <%- xblockInfo.get('display_name') %> +
      6. + <% } %> -
        -
          +
          +
          <% if (childType) { %> -
          - - <%= addChildLabel %> + <% } %> diff --git a/cms/templates/js/video/transcripts/file-upload.underscore b/cms/templates/js/video/transcripts/file-upload.underscore index 925b846c0180..fea4f5eec9e7 100644 --- a/cms/templates/js/video/transcripts/file-upload.underscore +++ b/cms/templates/js/video/transcripts/file-upload.underscore @@ -4,6 +4,6 @@
          - + accept="<%- _.map(ext, function(val){ return '.' + val; }).join(', ') %>"> +
          diff --git a/cms/templates/js/xblock-validation-messages.underscore b/cms/templates/js/xblock-validation-messages.underscore index fc1cc142bd89..c3f0bcc02301 100644 --- a/cms/templates/js/xblock-validation-messages.underscore +++ b/cms/templates/js/xblock-validation-messages.underscore @@ -3,7 +3,7 @@ var summaryMessage = validation.get("summary"); var aggregateMessageType = summaryMessage.type; var aggregateValidationClass = aggregateMessageType === "error"? "has-errors" : "has-warnings"; %> -
          +

          <%- summaryMessage.text %> <% if (summaryMessage.action_class) { %> @@ -25,7 +25,7 @@ var aggregateValidationClass = aggregateMessageType === "error"? "has-errors" : var messageType = message.type var messageTypeDisplayName = getDisplayName(messageType) %> -

        1. +
        2. <% if (messageTypeDisplayName) { %> <%- messageTypeDisplayName %>: diff --git a/lms/djangoapps/badges/events/course_complete.py b/lms/djangoapps/badges/events/course_complete.py index dd420b8d259d..14f54424a823 100644 --- a/lms/djangoapps/badges/events/course_complete.py +++ b/lms/djangoapps/badges/events/course_complete.py @@ -7,6 +7,7 @@ import logging import six + from django.urls import reverse from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ @@ -15,6 +16,7 @@ from badges.utils import requires_badges_enabled, site_prefix from xmodule.modulestore.django import modulestore + LOGGER = logging.getLogger(__name__) @@ -63,8 +65,11 @@ def evidence_url(user_id, course_key): event. """ course_id = six.text_type(course_key) + # avoid circular import problems + from lms.djangoapps.certificates.models import GeneratedCertificate + cert = GeneratedCertificate.eligible_certificates.get(user__id=int(user_id), course_id=course_id) return site_prefix() + reverse( - 'certificates:html_view', kwargs={'user_id': user_id, 'course_id': course_id}) + '?evidence_visit=1' + 'certificates:render_cert_by_uuid', kwargs={'certificate_uuid': cert.verify_uuid}) + '?evidence_visit=1' def criteria(course_key): diff --git a/lms/djangoapps/badges/events/tests/test_course_complete.py b/lms/djangoapps/badges/events/tests/test_course_complete.py index 2755aa2940ab..ad4514094fdd 100644 --- a/lms/djangoapps/badges/events/tests/test_course_complete.py +++ b/lms/djangoapps/badges/events/tests/test_course_complete.py @@ -1,11 +1,11 @@ """ Tests for the course completion helper functions. """ - - from datetime import datetime +from uuid import uuid4 from badges.events import course_complete +from lms.djangoapps.certificates.models import GeneratedCertificate from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -64,9 +64,19 @@ def test_evidence_url(self): Make sure the evidence URL points to the right place. """ user = UserFactory.create() + cert = GeneratedCertificate.eligible_certificates.create( + user=user, + course_id=self.course_key, + download_uuid=uuid4(), + grade="0.95", + key='the_key', + distinction=True, + status='downloadable', + mode='honor', + name=user.profile.name, + verify_uuid=uuid4().hex + ) self.assertEqual( - 'https://edx.org/certificates/user/{user_id}/course/{course_key}?evidence_visit=1'.format( - user_id=user.id, course_key=self.course_key - ), + 'https://edx.org/certificates/{}?evidence_visit=1'.format(cert.verify_uuid), course_complete.evidence_url(user.id, self.course_key) ) diff --git a/lms/djangoapps/certificates/api.py b/lms/djangoapps/certificates/api.py index d0176aa0fc11..56fd44bf8969 100644 --- a/lms/djangoapps/certificates/api.py +++ b/lms/djangoapps/certificates/api.py @@ -312,7 +312,9 @@ def certificate_downloadable_status(student, course_key): if current_status['status'] == CertificateStatuses.downloadable and may_view_certificate: response_data['is_downloadable'] = True - response_data['download_url'] = current_status['download_url'] or get_certificate_url(student.id, course_key) + response_data['download_url'] = current_status['download_url'] or get_certificate_url( + student.id, course_key, current_status['uuid'] + ) response_data['is_pdf_certificate'] = bool(current_status['download_url']) response_data['uuid'] = current_status['uuid'] @@ -472,13 +474,13 @@ def _course_from_key(course_key): return CourseOverview.get_from_id(_safe_course_key(course_key)) -def _certificate_html_url(user_id, course_id, uuid): - if uuid: - return reverse('certificates:render_cert_by_uuid', kwargs={'certificate_uuid': uuid}) - elif user_id and course_id: - kwargs = {"user_id": str(user_id), "course_id": six.text_type(course_id)} - return reverse('certificates:html_view', kwargs=kwargs) - return '' +def _certificate_html_url(uuid): + """ + Returns uuid based certificate URL. + """ + return reverse( + 'certificates:render_cert_by_uuid', kwargs={'certificate_uuid': uuid} + ) if uuid else '' def _certificate_download_url(user_id, course_id, user_certificate=None): @@ -515,7 +517,7 @@ def get_certificate_url(user_id=None, course_id=None, uuid=None, user_certificat return url if has_html_certificates_enabled(course): - url = _certificate_html_url(user_id, course_id, uuid) + url = _certificate_html_url(uuid) else: url = _certificate_download_url(user_id, course_id, user_certificate=user_certificate) return url @@ -631,10 +633,11 @@ def emit_certificate_event(event_name, user, course_id, course=None, event_data= 'org_id': course.org, 'course_id': six.text_type(course_id) } + data = { 'user_id': user.id, 'course_id': six.text_type(course_id), - 'certificate_url': get_certificate_url(user.id, course_id) + 'certificate_url': get_certificate_url(user.id, course_id, uuid=event_data['certificate_id']) } event_data = event_data or {} event_data.update(data) diff --git a/lms/djangoapps/certificates/tests/test_api.py b/lms/djangoapps/certificates/tests/test_api.py index 783677874c87..ff7eb85645cf 100644 --- a/lms/djangoapps/certificates/tests/test_api.py +++ b/lms/djangoapps/certificates/tests/test_api.py @@ -199,10 +199,7 @@ def test_with_downloadable_web_cert(self): 'is_downloadable': True, 'is_generating': False, 'is_unverified': False, - 'download_url': '/certificates/user/{user_id}/course/{course_id}'.format( - user_id=self.student.id, - course_id=self.course.id, - ), + 'download_url': '/certificates/{uuid}'.format(uuid=cert_status['uuid']), 'is_pdf_certificate': False, 'uuid': cert_status['uuid'] } @@ -496,16 +493,14 @@ def test_get_web_certificate_url(self): self.assertEqual(expected_url, cert_url) expected_url = reverse( - 'certificates:html_view', - kwargs={ - "user_id": str(self.student.id), - "course_id": six.text_type(self.web_cert_course.id), - } + 'certificates:render_cert_by_uuid', + kwargs=dict(certificate_uuid=self.uuid) ) cert_url = certs_api.get_certificate_url( user_id=self.student.id, - course_id=self.web_cert_course.id + course_id=self.web_cert_course.id, + uuid=self.uuid ) self.assertEqual(expected_url, cert_url) diff --git a/lms/djangoapps/certificates/tests/test_support_views.py b/lms/djangoapps/certificates/tests/test_support_views.py index cf57059d2829..a47df6a8eee6 100644 --- a/lms/djangoapps/certificates/tests/test_support_views.py +++ b/lms/djangoapps/certificates/tests/test_support_views.py @@ -4,9 +4,11 @@ import json +from uuid import uuid4 import ddt import six + from django.conf import settings from django.test.utils import override_settings from django.urls import reverse @@ -85,6 +87,7 @@ def setUp(self): status=self.CERT_STATUS, mode=self.CERT_MODE, download_url=self.CERT_DOWNLOAD_URL, + verify_uuid=uuid4().hex ) # Login as support staff @@ -226,8 +229,8 @@ def test_download_link(self): self.assertEqual( retrieved_cert["download_url"], reverse( - 'certificates:html_view', - kwargs={"user_id": self.student.id, "course_id": self.course.id} + 'certificates:render_cert_by_uuid', + kwargs={"certificate_uuid": self.cert.verify_uuid} ) ) self.assertTrue(retrieved_cert["regenerate"]) diff --git a/lms/djangoapps/certificates/tests/test_views.py b/lms/djangoapps/certificates/tests/test_views.py index 6e01f8e1f7a5..a823d1c5d7ca 100644 --- a/lms/djangoapps/certificates/tests/test_views.py +++ b/lms/djangoapps/certificates/tests/test_views.py @@ -229,13 +229,14 @@ def setUp(self): self.cert = GeneratedCertificate.eligible_certificates.create( user=self.user, course_id=self.course_id, - download_uuid=uuid4(), + download_uuid=uuid4().hex, grade="0.95", key='the_key', distinction=True, status='downloadable', mode='honor', name=self.user.profile.name, + verify_uuid=uuid4().hex ) self._setup_configuration() @@ -284,7 +285,8 @@ def _add_course_certificates(self, count=1, signatory_count=0, is_active=True): def test_html_view_for_site(self): test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) self._add_course_certificates(count=1, signatory_count=2) response = self.client.get(test_url) @@ -302,7 +304,8 @@ def test_html_view_for_site(self): def test_html_view_site_configuration_missing(self): test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) self._add_course_certificates(count=1, signatory_count=2) response = self.client.get(test_url) diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index d28c51aa527e..fb74f04a74f0 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -102,7 +102,7 @@ def setUp(self): self.cert = GeneratedCertificateFactory.create( user=self.user, course_id=self.course_id, - download_uuid=uuid4(), + download_uuid=uuid4().hex, download_url="http://www.example.com/certificates/download", grade="0.95", key='the_key', @@ -409,7 +409,8 @@ def test_rendering_course_organization_data(self): self._add_course_certificates(count=1, signatory_count=1, is_active=True) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) self.assertContains( @@ -489,7 +490,8 @@ def test_rendering_maximum_data(self): test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url, HTTP_HOST='test.localhost') @@ -527,7 +529,8 @@ def test_render_html_view_valid_certificate(self): self._add_course_certificates(count=1, signatory_count=2) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) self.assertContains(response, str(self.cert.verify_uuid)) @@ -553,7 +556,8 @@ def test_render_certificate_only_for_downloadable_status(self): self._add_course_certificates(count=1, signatory_count=2) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) # Validate certificate @@ -564,9 +568,7 @@ def test_render_certificate_only_for_downloadable_status(self): self.cert.status = CertificateStatuses.generating self.cert.save() response = self.client.get(test_url) - self.assertContains(response, "Invalid Certificate") - self.assertContains(response, "Cannot Find Certificate") - self.assertContains(response, "We cannot find a certificate with this URL or ID number.") + self.assertEqual(response.status_code, 404) @ddt.data( (CertificateStatuses.downloadable, True), @@ -588,27 +590,26 @@ def test_audit_certificate_display(self, status, eligible_for_certificate): self._add_course_certificates(count=1, signatory_count=2) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) - if eligible_for_certificate: self.assertContains(response, str(self.cert.verify_uuid)) else: - self.assertContains(response, "Invalid Certificate") - self.assertContains(response, "Cannot Find Certificate") - self.assertContains(response, "We cannot find a certificate with this URL or ID number.") - self.assertNotContains(response, str(self.cert.verify_uuid)) + self.assertEqual(response.status_code, 404) @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) - def test_html_view_for_invalid_certificate(self): + def test_html_view_returns_404_for_invalid_certificate(self): """ - Tests that Certificate HTML Web View returns "Cannot Find Certificate" if certificate has been invalidated. + Tests that Certificate HTML Web View successfully retrieves certificate only + if the certificate is not invalidated otherwise returns 404 """ self._add_course_certificates(count=1, signatory_count=2) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) # Validate certificate @@ -618,32 +619,7 @@ def test_html_view_for_invalid_certificate(self): # invalidate certificate and verify that "Cannot Find Certificate" is returned self.cert.invalidate() response = self.client.get(test_url) - self.assertContains(response, "Invalid Certificate") - self.assertContains(response, "Cannot Find Certificate") - self.assertContains(response, "We cannot find a certificate with this URL or ID number.") - - @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) - def test_html_lang_attribute_is_dynamic_for_invalid_certificate_html_view(self): - """ - Tests that Certificate HTML Web View's lang attribute is based on user language. - """ - self._add_course_certificates(count=1, signatory_count=2) - test_url = get_certificate_url( - user_id=self.user.id, - course_id=six.text_type(self.course.id) - ) - - self.cert.invalidate() - - user_language = 'fr' - self.client.cookies[settings.LANGUAGE_COOKIE] = user_language - response = self.client.get(test_url) - self.assertContains(response, '') - - user_language = 'ar' - self.client.cookies[settings.LANGUAGE_COOKIE] = user_language - response = self.client.get(test_url) - self.assertContains(response, '') + self.assertEqual(response.status_code, 404) @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) def test_html_lang_attribute_is_dynamic_for_certificate_html_view(self): @@ -653,7 +629,8 @@ def test_html_lang_attribute_is_dynamic_for_certificate_html_view(self): self._add_course_certificates(count=1, signatory_count=2) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) user_language = 'fr' @@ -688,7 +665,8 @@ def test_html_view_for_non_viewable_certificate_and_for_student_user(self): test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) self.assertContains(response, "Invalid Certificate") @@ -700,7 +678,8 @@ def test_render_html_view_with_valid_signatories(self): self._add_course_certificates(count=1, signatory_count=2) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) @@ -729,7 +708,8 @@ def test_course_display_name_not_override_with_course_title(self): self.store.update_item(self.course, self.user.id) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) @@ -747,7 +727,8 @@ def test_course_display_overrides(self): self._add_course_certificates(count=1, signatory_count=2) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) self.course.display_coursenumber = "overridden_number" @@ -776,7 +757,8 @@ def test_certificate_view_without_org_logo(self): test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) # make sure response html has only one organization logo container for edX @@ -787,7 +769,8 @@ def test_render_html_view_without_signatories(self): self._add_course_certificates(count=1, signatory_count=0) test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) self.assertNotContains(response, 'Signatory_Name 0') @@ -815,7 +798,8 @@ def test_render_html_view_is_html_escaped(self): test_url = get_certificate_url( user_id=self.user.id, - course_id=six.text_type(self.course.id) + course_id=six.text_type(self.course.id), + uuid=self.cert.verify_uuid ) response = self.client.get(test_url) self.assertNotContains(response, '