'Verify that the student\'s run mode certificate is included,
when available.'

@ddt.data(True, False)
@mock.patch((UTILS_MODULE + '.certificate_api.certificate_downloadable_status'))
@mock.patch((CERTIFICATES_API_MODULE + '.has_html_certificates_enabled'))
def test_certificate_url_retrieval(self, is_uuid_available, mock_html_certs_enabled, mock_get_cert_data):

    test_uuid = uuid.uuid4().hex
    mock_get_cert_data.return_value = ({'uuid': test_uuid} if is_uuid_available else {})
    mock_html_certs_enabled.return_value = True
    data = ProgramDataExtender(self.program, self.user).extend()
    expected_url = (reverse('certificates:render_cert_by_uuid', kwargs={'certificate_uuid': test_uuid}) if is_uuid_available else None)
    self._assert_supplemented(data, certificate_url=expected_url)
