ECOM-1592: code refactoring

This commit is contained in:
aamir-khan
2015-06-02 16:31:23 +05:00
parent 810733db2c
commit 41db8d8ec1
2 changed files with 5 additions and 5 deletions

View File

@@ -136,13 +136,13 @@ def _is_credit_requirement(xblock):
if not callable(getattr(xblock, "get_credit_requirement_namespace", None)):
is_credit_requirement = False
LOGGER.error(
"XBlock %v is marked as a credit requirement but does not "
"implement get_credit_requirement_namespace()", xblock
"XBlock %s is marked as a credit requirement but does not "
"implement get_credit_requirement_namespace()", unicode(xblock)
)
if not callable(getattr(xblock, "get_credit_requirement_name", None)):
is_credit_requirement = False
LOGGER.error(
"XBlock %v is marked as a credit requirement but does not "
"implement get_credit_requirement_name()", xblock
"XBlock %s is marked as a credit requirement but does not "
"implement get_credit_requirement_name()", unicode(xblock)
)
return is_credit_requirement

View File

@@ -32,7 +32,7 @@ class TestTaskExecution(ModuleStoreTestCase):
section = ItemFactory.create(parent=self.course, category='chapter', display_name='Test Section')
subsection = ItemFactory.create(parent=section, category='sequential', display_name='Test Subsection')
vertical = ItemFactory.create(parent=subsection, category='vertical', display_name='Test Unit')
reverification = ItemFactory.create(
ItemFactory.create(
parent=vertical,
category='edx-reverification-block',
display_name='Test Verification Block'