Commit ed584a9a by Chris Dodge

fix pep8 violations

parent c6cde6a7
......@@ -160,7 +160,7 @@ def load_preview_module(request, preview_id, descriptor):
module.get_html = replace_static_urls(
module.get_html,
getattr(module, 'data_dir', module.location.course),
course_id=module.location.org+'/'+module.location.course+'/BOGUS_RUN_REPLACE_WHEN_AVAILABLE'
course_id=module.location.org + '/' + module.location.course + '/BOGUS_RUN_REPLACE_WHEN_AVAILABLE'
)
module.get_html = save_module(
......
......@@ -395,7 +395,7 @@ class ModuleStore(object):
def get_modulestore_type(self, course_id):
"""
Returns a type which identifies which modulestore is servicing the given
Returns a type which identifies which modulestore is servicing the given
course_id. The return can be either "xml" (for XML based courses) or "mongo" for MongoDB backed courses
"""
raise NotImplementedError
......
......@@ -298,14 +298,15 @@ class SplitModuleItemTests(SplitModuleTest):
# in published course
locator = BlockUsageLocator(course_id="wonderful", usage_id="head23456", branch='draft')
self.assertTrue(modulestore().has_item(locator.course_id, BlockUsageLocator(course_id=locator.course_id,
usage_id=locator.usage_id,
branch='published')),
"couldn't find in 23456")
self.assertTrue(
modulestore().has_item(
locator.course_id,
BlockUsageLocator(course_id=locator.course_id, usage_id=locator.usage_id, branch='published')
), "couldn't find in 23456"
)
locator.branch = 'published'
self.assertTrue(modulestore().has_item(course_id, locator), "couldn't find in 23456")
def test_negative_has_item(self):
# negative tests--not found
# no such course or block
......
......@@ -604,7 +604,7 @@ class XMLModuleStore(ModuleStoreBase):
def get_modulestore_type(self, course_id):
"""
Returns a type which identifies which modulestore is servicing the given
Returns a type which identifies which modulestore is servicing the given
course_id. The return can be either "xml" (for XML based courses) or "mongo" for MongoDB backed courses
"""
return XML_MODULESTORE_TYPE
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment