Ran pyupgrade on lms/djangoapps
Ran pyupgrade on lms/djangoapps/mailing Ran pyupgrade on lms/djangoapps/mobile_api Ran pyupgrade on lms/djangoapps/monitoring
This commit is contained in:
@@ -6,7 +6,6 @@ Tests for course_info
|
||||
import ddt
|
||||
from django.conf import settings
|
||||
from milestones.tests.utils import MilestonesTestCaseMixin
|
||||
from six.moves import range
|
||||
|
||||
from lms.djangoapps.mobile_api.testutils import MobileAPITestCase, MobileAuthTestMixin, MobileCourseAccessTestMixin
|
||||
from lms.djangoapps.mobile_api.utils import API_V1, API_V05
|
||||
@@ -24,7 +23,7 @@ class TestUpdates(MobileAPITestCase, MobileAuthTestMixin, MobileCourseAccessTest
|
||||
REVERSE_INFO = {'name': 'course-updates-list', 'params': ['course_id', 'api_version']}
|
||||
|
||||
def verify_success(self, response):
|
||||
super(TestUpdates, self).verify_success(response) # lint-amnesty, pylint: disable=super-with-arguments
|
||||
super().verify_success(response)
|
||||
assert response.data == []
|
||||
|
||||
@ddt.data(
|
||||
@@ -67,7 +66,7 @@ class TestUpdates(MobileAPITestCase, MobileAuthTestMixin, MobileCourseAccessTest
|
||||
# old format stores the updates with the newest first
|
||||
for num in range(num_updates, 0, -1):
|
||||
update_data += "<li><h2>Date" + str(num) + "</h2><a href=\"/static/\">Update" + str(num) + "</a></li>"
|
||||
course_updates.data = u"<ol>" + update_data + "</ol>"
|
||||
course_updates.data = "<ol>" + update_data + "</ol>"
|
||||
modulestore().update_item(course_updates, self.user.id)
|
||||
|
||||
# call API
|
||||
|
||||
@@ -10,12 +10,12 @@ from .views import CourseHandoutsList, CourseUpdatesList
|
||||
|
||||
urlpatterns = [
|
||||
url(
|
||||
r'^{}/handouts$'.format(settings.COURSE_ID_PATTERN),
|
||||
fr'^{settings.COURSE_ID_PATTERN}/handouts$',
|
||||
CourseHandoutsList.as_view(),
|
||||
name='course-handouts-list'
|
||||
),
|
||||
url(
|
||||
r'^{}/updates$'.format(settings.COURSE_ID_PATTERN),
|
||||
fr'^{settings.COURSE_ID_PATTERN}/updates$',
|
||||
CourseUpdatesList.as_view(),
|
||||
name='course-updates-list'
|
||||
),
|
||||
|
||||
@@ -6,9 +6,9 @@ Views for course info API
|
||||
from rest_framework import generics
|
||||
from rest_framework.response import Response
|
||||
|
||||
from common.djangoapps.static_replace import make_static_urls_absolute
|
||||
from lms.djangoapps.courseware.courses import get_course_info_section_module
|
||||
from openedx.core.lib.xblock_utils import get_course_update_items
|
||||
from common.djangoapps.static_replace import make_static_urls_absolute
|
||||
|
||||
from ..decorators import mobile_course_access, mobile_view
|
||||
|
||||
|
||||
Reference in New Issue
Block a user