Fixed some TODOs, removed irrelevant ones
This commit is contained in:
committed by
Sarina Canelake
parent
110719deae
commit
6f7bc7e174
@@ -39,7 +39,7 @@ class TestLTI(BaseTestXmodule):
|
||||
mocked_signature_after_sign = u'my_signature%3D'
|
||||
mocked_decoded_signature = u'my_signature='
|
||||
|
||||
# TODO this course_id is actually a course_key; please change this ASAP!
|
||||
# Note: this course_id is actually a course_key
|
||||
context_id = self.item_descriptor.course_id.to_deprecated_string()
|
||||
user_id = unicode(self.item_descriptor.xmodule_runtime.anonymous_student_id)
|
||||
hostname = self.item_descriptor.xmodule_runtime.hostname
|
||||
|
||||
@@ -48,8 +48,7 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
|
||||
Base class that adds a function to load all pages in a modulestore.
|
||||
"""
|
||||
|
||||
# TODO once everything is merged can someone please check whether this function takes a course_id or course_key
|
||||
def check_all_pages_load(self, course_id):
|
||||
def check_all_pages_load(self, course_key):
|
||||
"""
|
||||
Assert that all pages in the course load correctly.
|
||||
`course_id` is the ID of the course to check.
|
||||
@@ -58,11 +57,11 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
|
||||
store = modulestore()
|
||||
|
||||
# Enroll in the course before trying to access pages
|
||||
course = store.get_course(course_id)
|
||||
course = store.get_course(course_key)
|
||||
self.enroll(course, True)
|
||||
|
||||
# Search for items in the course
|
||||
items = store.get_items(course_id)
|
||||
items = store.get_items(course_key)
|
||||
|
||||
if len(items) < 1:
|
||||
self.fail('Could not retrieve any items from course')
|
||||
@@ -72,21 +71,21 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
|
||||
|
||||
if descriptor.location.category == 'about':
|
||||
self._assert_loads('about_course',
|
||||
{'course_id': course_id.to_deprecated_string()},
|
||||
{'course_id': course_key.to_deprecated_string()},
|
||||
descriptor)
|
||||
|
||||
elif descriptor.location.category == 'static_tab':
|
||||
kwargs = {'course_id': course_id.to_deprecated_string(),
|
||||
kwargs = {'course_id': course_key.to_deprecated_string(),
|
||||
'tab_slug': descriptor.location.name}
|
||||
self._assert_loads('static_tab', kwargs, descriptor)
|
||||
|
||||
elif descriptor.location.category == 'course_info':
|
||||
self._assert_loads('info', {'course_id': course_id.to_deprecated_string()},
|
||||
self._assert_loads('info', {'course_id': course_key.to_deprecated_string()},
|
||||
descriptor)
|
||||
|
||||
else:
|
||||
|
||||
kwargs = {'course_id': course_id.to_deprecated_string(),
|
||||
kwargs = {'course_id': course_key.to_deprecated_string(),
|
||||
'location': descriptor.location.to_deprecated_string()}
|
||||
|
||||
self._assert_loads('jump_to', kwargs, descriptor,
|
||||
|
||||
Reference in New Issue
Block a user