fix pep8 violations

This commit is contained in:
Chris Dodge
2013-08-15 12:41:30 -04:00
parent c6cde6a722
commit ed584a9abb
4 changed files with 9 additions and 8 deletions

View File

@@ -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(

View File

@@ -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

View File

@@ -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

View File

@@ -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