Fix calls to get_module to not pass course ids as positions
This commit is contained in:
@@ -68,7 +68,7 @@ class ModuleRenderTestCase(ModuleStoreTestCase, LoginEnrollmentTestCase):
|
||||
def test_get_module(self):
|
||||
self.assertEqual(
|
||||
None,
|
||||
render.get_module('dummyuser', None, 'invalid location', None, None)
|
||||
render.get_module('dummyuser', None, 'invalid location', None)
|
||||
)
|
||||
|
||||
def test_module_render_with_jump_to_id(self):
|
||||
@@ -90,7 +90,6 @@ class ModuleRenderTestCase(ModuleStoreTestCase, LoginEnrollmentTestCase):
|
||||
mock_request,
|
||||
self.course_key.make_usage_key('html', 'toyjumpto'),
|
||||
field_data_cache,
|
||||
self.course_key
|
||||
)
|
||||
|
||||
# get the rendered HTML output which should have the rewritten link
|
||||
@@ -414,7 +413,6 @@ class TestHtmlModifiers(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
wrap_xmodule_display=True,
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
@@ -427,7 +425,6 @@ class TestHtmlModifiers(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
wrap_xmodule_display=False,
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
@@ -440,7 +437,6 @@ class TestHtmlModifiers(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
|
||||
@@ -458,7 +454,6 @@ class TestHtmlModifiers(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
|
||||
@@ -481,7 +476,6 @@ class TestHtmlModifiers(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
static_asset_path="toy_course_dir",
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
@@ -508,7 +502,6 @@ class TestHtmlModifiers(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
|
||||
@@ -546,7 +539,6 @@ class ViewInStudioTest(ModuleStoreTestCase):
|
||||
self.request,
|
||||
location,
|
||||
field_data_cache,
|
||||
course_id,
|
||||
)
|
||||
|
||||
def setup_mongo_course(self, course_edit_method='Studio'):
|
||||
@@ -693,7 +685,6 @@ class TestStaffDebugInfo(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
self.assertNotIn('Staff Debug', result_fragment.content)
|
||||
@@ -704,7 +695,6 @@ class TestStaffDebugInfo(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
self.assertIn('Staff Debug', result_fragment.content)
|
||||
@@ -716,7 +706,6 @@ class TestStaffDebugInfo(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
)
|
||||
result_fragment = module.render(STUDENT_VIEW)
|
||||
self.assertNotIn('histrogram', result_fragment.content)
|
||||
@@ -740,7 +729,6 @@ class TestStaffDebugInfo(ModuleStoreTestCase):
|
||||
self.request,
|
||||
html_descriptor.location,
|
||||
field_data_cache,
|
||||
self.course.id,
|
||||
)
|
||||
module.render(STUDENT_VIEW)
|
||||
self.assertFalse(mock_grade_histogram.called)
|
||||
@@ -763,7 +751,6 @@ class TestStaffDebugInfo(ModuleStoreTestCase):
|
||||
self.request,
|
||||
self.location,
|
||||
self.field_data_cache,
|
||||
self.course.id,
|
||||
)
|
||||
module.render(STUDENT_VIEW)
|
||||
self.assertTrue(mock_grade_histogram.called)
|
||||
@@ -929,7 +916,6 @@ class TestXmoduleRuntimeEvent(TestSubmittingProblems):
|
||||
mock_request,
|
||||
self.problem.location,
|
||||
field_data_cache,
|
||||
self.course.id
|
||||
)._xmodule
|
||||
|
||||
def set_module_grade_using_publish(self, grade_dict):
|
||||
@@ -978,7 +964,7 @@ class TestRebindModule(TestSubmittingProblems):
|
||||
mock_request,
|
||||
self.lti.location,
|
||||
field_data_cache,
|
||||
self.course.id)._xmodule
|
||||
)._xmodule
|
||||
|
||||
def test_rebind_noauth_module_to_user_not_anonymous(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user