Commit fb9f324f by stv

Fix PEP8: E303 too many blank lines

parent cf930814
...@@ -333,7 +333,6 @@ def get_codemirror_value(index=0, find_prefix="$"): ...@@ -333,7 +333,6 @@ def get_codemirror_value(index=0, find_prefix="$"):
) )
def attach_file(filename, sub_path): def attach_file(filename, sub_path):
path = os.path.join(TEST_ROOT, sub_path, filename) path = os.path.join(TEST_ROOT, sub_path, filename)
world.browser.execute_script("$('input.file-input').css('display', 'block')") world.browser.execute_script("$('input.file-input').css('display', 'block')")
......
...@@ -161,7 +161,6 @@ class TestDownloadYoutubeSubs(ModuleStoreTestCase): ...@@ -161,7 +161,6 @@ class TestDownloadYoutubeSubs(ModuleStoreTestCase):
number = '999' number = '999'
display_name = 'Test course' display_name = 'Test course'
def clear_sub_content(self, subs_id): def clear_sub_content(self, subs_id):
""" """
Remove, if subtitle content exists. Remove, if subtitle content exists.
...@@ -490,7 +489,6 @@ class TestTranscript(unittest.TestCase): ...@@ -490,7 +489,6 @@ class TestTranscript(unittest.TestCase):
""") """)
self.sjson_transcript = textwrap.dedent("""\ self.sjson_transcript = textwrap.dedent("""\
{ {
"start": [ "start": [
......
...@@ -100,7 +100,6 @@ def _course_team_user(request, course_key, email): ...@@ -100,7 +100,6 @@ def _course_team_user(request, course_key, email):
} }
return JsonResponse(msg, 400) return JsonResponse(msg, 400)
try: try:
user = User.objects.get(email=email) user = User.objects.get(email=email)
except Exception: except Exception:
......
...@@ -150,7 +150,6 @@ class CourseModeViewTest(ModuleStoreTestCase): ...@@ -150,7 +150,6 @@ class CourseModeViewTest(ModuleStoreTestCase):
response = self.client.get(choose_track_url) response = self.client.get(choose_track_url)
self.assertRedirects(response, reverse('dashboard')) self.assertRedirects(response, reverse('dashboard'))
# Mapping of course modes to the POST parameters sent # Mapping of course modes to the POST parameters sent
# when the user chooses that mode. # when the user chooses that mode.
POST_PARAMS_FOR_COURSE_MODE = { POST_PARAMS_FOR_COURSE_MODE = {
......
...@@ -144,7 +144,6 @@ class DarkLangMiddlewareTests(TestCase): ...@@ -144,7 +144,6 @@ class DarkLangMiddlewareTests(TestCase):
self.process_request(accept='rel-ter;q=1.0, rel;q=0.5') self.process_request(accept='rel-ter;q=1.0, rel;q=0.5')
) )
def assertSessionLangEquals(self, value, request): def assertSessionLangEquals(self, value, request):
""" """
Assert that the 'django_language' set in request.session is equal to value Assert that the 'django_language' set in request.session is equal to value
......
...@@ -34,7 +34,6 @@ class MakoLoader(object): ...@@ -34,7 +34,6 @@ class MakoLoader(object):
self.module_directory = module_directory self.module_directory = module_directory
def __call__(self, template_name, template_dirs=None): def __call__(self, template_name, template_dirs=None):
return self.load_template(template_name, template_dirs) return self.load_template(template_name, template_dirs)
......
...@@ -36,7 +36,6 @@ class TestStatus(TestCase): ...@@ -36,7 +36,6 @@ class TestStatus(TestCase):
"edX/toy/2012_Fall" : "A toy story" "edX/toy/2012_Fall" : "A toy story"
}""" }"""
# json to use, expected results for course=None (e.g. homepage), # json to use, expected results for course=None (e.g. homepage),
# for toy course, for full course. Note that get_site_status_msg # for toy course, for full course. Note that get_site_status_msg
# is supposed to return global message even if course=None. The # is supposed to return global message even if course=None. The
......
...@@ -18,12 +18,10 @@ class Migration(SchemaMigration): ...@@ -18,12 +18,10 @@ class Migration(SchemaMigration):
)) ))
db.send_create_signal('student', ['DashboardConfiguration']) db.send_create_signal('student', ['DashboardConfiguration'])
def backwards(self, orm): def backwards(self, orm):
# Deleting model 'DashboardConfiguration' # Deleting model 'DashboardConfiguration'
db.delete_table('student_dashboardconfiguration') db.delete_table('student_dashboardconfiguration')
models = { models = {
'auth.group': { 'auth.group': {
'Meta': {'object_name': 'Group'}, 'Meta': {'object_name': 'Group'},
......
...@@ -300,7 +300,6 @@ class StubOraHandler(StubHttpRequestHandler): ...@@ -300,7 +300,6 @@ class StubOraHandler(StubHttpRequestHandler):
""" """
self._success_response({'problem_list': self.server.problem_list}) self._success_response({'problem_list': self.server.problem_list})
@require_params('POST', 'grader_id', 'location', 'submission_id', 'score', 'feedback', 'submission_key') @require_params('POST', 'grader_id', 'location', 'submission_id', 'score', 'feedback', 'submission_key')
def _save_grade(self): def _save_grade(self):
""" """
...@@ -421,7 +420,6 @@ class StubOraHandler(StubHttpRequestHandler): ...@@ -421,7 +420,6 @@ class StubOraHandler(StubHttpRequestHandler):
) )
self.send_response(400) self.send_response(400)
def _student(self, method, key='student_id'): def _student(self, method, key='student_id'):
""" """
Return the `StudentState` instance for the student ID given Return the `StudentState` instance for the student ID given
......
...@@ -165,7 +165,6 @@ class CorrectMap(object): ...@@ -165,7 +165,6 @@ class CorrectMap(object):
self.cmap.update(other_cmap.get_dict()) self.cmap.update(other_cmap.get_dict())
self.set_overall_message(other_cmap.get_overall_message()) self.set_overall_message(other_cmap.get_overall_message())
def set_overall_message(self, message_str): def set_overall_message(self, message_str):
""" Set a message that applies to the question as a whole, """ Set a message that applies to the question as a whole,
rather than to individual inputs. """ rather than to individual inputs. """
......
...@@ -50,7 +50,6 @@ class MathRenderer(object): ...@@ -50,7 +50,6 @@ class MathRenderer(object):
mathstr = mathstr.replace(r'\displaystyle', '') mathstr = mathstr.replace(r'\displaystyle', '')
self.mathstr = mathstr.replace('mathjaxinline]', '%s]' % mtag) self.mathstr = mathstr.replace('mathjaxinline]', '%s]' % mtag)
def get_html(self): def get_html(self):
""" """
Return the contents of this tag, rendered to html, as an etree element. Return the contents of this tag, rendered to html, as an etree element.
......
...@@ -839,7 +839,6 @@ class MatlabInput(CodeInput): ...@@ -839,7 +839,6 @@ class MatlabInput(CodeInput):
'No response from Xqueue within {xqueue_timeout} seconds. Aborted.' 'No response from Xqueue within {xqueue_timeout} seconds. Aborted.'
).format(xqueue_timeout=XQUEUE_TIMEOUT) ).format(xqueue_timeout=XQUEUE_TIMEOUT)
def handle_ajax(self, dispatch, data): def handle_ajax(self, dispatch, data):
""" """
Handle AJAX calls directed to this input Handle AJAX calls directed to this input
......
...@@ -604,7 +604,6 @@ class MatlabTest(unittest.TestCase): ...@@ -604,7 +604,6 @@ class MatlabTest(unittest.TestCase):
the_input = self.input_class(test_capa_system(), elt, state) the_input = self.input_class(test_capa_system(), elt, state)
self.assertEqual(the_input.status, 'queued') self.assertEqual(the_input.status, 'queued')
@patch('capa.inputtypes.time.time', return_value=45) @patch('capa.inputtypes.time.time', return_value=45)
def test_matlab_response_timeout_exceeded(self, time): def test_matlab_response_timeout_exceeded(self, time):
......
...@@ -606,7 +606,6 @@ class StringResponseTest(ResponseTest): ...@@ -606,7 +606,6 @@ class StringResponseTest(ResponseTest):
self.assert_grade(problem, u"î", "incorrect") self.assert_grade(problem, u"î", "incorrect")
self.assert_grade(problem, u"o", "incorrect") self.assert_grade(problem, u"o", "incorrect")
def test_backslash_and_unicode_regexps(self): def test_backslash_and_unicode_regexps(self):
""" """
Test some special cases of [unicode] regexps. Test some special cases of [unicode] regexps.
...@@ -1042,8 +1041,6 @@ class CodeResponseTest(ResponseTest): ...@@ -1042,8 +1041,6 @@ class CodeResponseTest(ResponseTest):
self.assertEquals(output[answer_id]['msg'], u'Invalid grader reply. Please contact the course staff.') self.assertEquals(output[answer_id]['msg'], u'Invalid grader reply. Please contact the course staff.')
class ChoiceResponseTest(ResponseTest): class ChoiceResponseTest(ResponseTest):
from capa.tests.response_xml_factory import ChoiceResponseXMLFactory from capa.tests.response_xml_factory import ChoiceResponseXMLFactory
xml_factory_class = ChoiceResponseXMLFactory xml_factory_class = ChoiceResponseXMLFactory
......
...@@ -82,7 +82,6 @@ class UtilTest(unittest.TestCase): ...@@ -82,7 +82,6 @@ class UtilTest(unittest.TestCase):
result = compare_with_tolerance(infinity, infinity, '1.0', False) result = compare_with_tolerance(infinity, infinity, '1.0', False)
self.assertTrue(result) self.assertTrue(result)
def test_sanitize_html(self): def test_sanitize_html(self):
""" """
Test for html sanitization with bleach. Test for html sanitization with bleach.
......
...@@ -192,7 +192,6 @@ def _render_to_html(tree): ...@@ -192,7 +192,6 @@ def _render_to_html(tree):
return children.replace(' ', '') return children.replace(' ', '')
def render_to_html(eq): def render_to_html(eq):
''' '''
Render a chemical equation string to html. Render a chemical equation string to html.
...@@ -231,7 +230,6 @@ def render_to_html(eq): ...@@ -231,7 +230,6 @@ def render_to_html(eq):
# only one side # only one side
return spanify(render_expression(left)) return spanify(render_expression(left))
return spanify(render_expression(left) + render_arrow(arrow) + render_expression(right)) return spanify(render_expression(left) + render_arrow(arrow) + render_expression(right))
......
...@@ -64,7 +64,6 @@ class Test_Compare_Equations(unittest.TestCase): ...@@ -64,7 +64,6 @@ class Test_Compare_Equations(unittest.TestCase):
self.assertFalse(chemical_equations_equal('H2O( -> H2O2', self.assertFalse(chemical_equations_equal('H2O( -> H2O2',
'H2O -> H2O2')) 'H2O -> H2O2'))
self.assertFalse(chemical_equations_equal('H2 + O2 ==> H2O2', # strange arrow self.assertFalse(chemical_equations_equal('H2 + O2 ==> H2O2', # strange arrow
'2O2 + 2H2 -> 2H2O2')) '2O2 + 2H2 -> 2H2O2'))
......
...@@ -257,7 +257,6 @@ class formula(object): ...@@ -257,7 +257,6 @@ class formula(object):
fix_pmathml(xml) fix_pmathml(xml)
def fix_hat(xml): def fix_hat(xml):
""" """
hat i is turned into <mover><mi>i</mi><mo>^</mo></mover> ; mangle hat i is turned into <mover><mi>i</mi><mo>^</mo></mover> ; mangle
......
...@@ -48,7 +48,6 @@ class HeartbeatFailure(Exception): ...@@ -48,7 +48,6 @@ class HeartbeatFailure(Exception):
def __unicode__(self, *args, **kwargs): def __unicode__(self, *args, **kwargs):
return self.message return self.message
def __init__(self, msg, service): def __init__(self, msg, service):
""" """
In addition to a msg, provide the name of the service. In addition to a msg, provide the name of the service.
......
...@@ -752,7 +752,6 @@ oauth_consumer_key="", oauth_signature="frVp4JuvT1mVXlxktiAUjQ7%2F1cw%3D"'} ...@@ -752,7 +752,6 @@ oauth_consumer_key="", oauth_signature="frVp4JuvT1mVXlxktiAUjQ7%2F1cw%3D"'}
log.debug("[LTI]: Incorrect action.") log.debug("[LTI]: Incorrect action.")
return Response(response_xml_template.format(**unsupported_values), content_type='application/xml') return Response(response_xml_template.format(**unsupported_values), content_type='application/xml')
@classmethod @classmethod
def parse_grade_xml_body(cls, body): def parse_grade_xml_body(cls, body):
""" """
......
...@@ -14,7 +14,6 @@ class BlockKey(namedtuple('BlockKey', 'type id')): ...@@ -14,7 +14,6 @@ class BlockKey(namedtuple('BlockKey', 'type id')):
def __new__(cls, type, id): def __new__(cls, type, id):
return super(BlockKey, cls).__new__(cls, type, id) return super(BlockKey, cls).__new__(cls, type, id)
@classmethod @classmethod
@contract(usage_key=BlockUsageLocator) @contract(usage_key=BlockUsageLocator)
def from_usage_key(cls, usage_key): def from_usage_key(cls, usage_key):
......
...@@ -38,7 +38,6 @@ class SplitMongoKVS(InheritanceKeyValueStore): ...@@ -38,7 +38,6 @@ class SplitMongoKVS(InheritanceKeyValueStore):
self.parent = parent self.parent = parent
def get(self, key): def get(self, key):
# load the field, if needed # load the field, if needed
if key.field_name not in self._fields: if key.field_name not in self._fields:
......
...@@ -115,7 +115,6 @@ class ModuleStoreSettingsMigration(TestCase): ...@@ -115,7 +115,6 @@ class ModuleStoreSettingsMigration(TestCase):
} }
} }
def assertStoreValuesEqual(self, store_setting1, store_setting2): def assertStoreValuesEqual(self, store_setting1, store_setting2):
""" """
Tests whether the fields in the given store_settings are equal. Tests whether the fields in the given store_settings are equal.
......
...@@ -188,7 +188,6 @@ def adapt_references(subtree, destination_course_key, export_fs): ...@@ -188,7 +188,6 @@ def adapt_references(subtree, destination_course_key, export_fs):
) )
def _export_field_content(xblock_item, item_dir): def _export_field_content(xblock_item, item_dir):
""" """
Export all fields related to 'xblock_item' other than 'metadata' and 'data' to json file in provided directory Export all fields related to 'xblock_item' other than 'metadata' and 'data' to json file in provided directory
......
...@@ -77,7 +77,6 @@ class RandomizeModule(RandomizeFields, XModule): ...@@ -77,7 +77,6 @@ class RandomizeModule(RandomizeFields, XModule):
return [self.child_descriptor] return [self.child_descriptor]
def student_view(self, context): def student_view(self, context):
if self.child is None: if self.child is None:
# raise error instead? In fact, could complain on descriptor load... # raise error instead? In fact, could complain on descriptor load...
...@@ -95,7 +94,6 @@ class RandomizeDescriptor(RandomizeFields, SequenceDescriptor): ...@@ -95,7 +94,6 @@ class RandomizeDescriptor(RandomizeFields, SequenceDescriptor):
filename_extension = "xml" filename_extension = "xml"
def definition_to_xml(self, resource_fs): def definition_to_xml(self, resource_fs):
xml_object = etree.Element('randomize') xml_object = etree.Element('randomize')
......
...@@ -60,7 +60,6 @@ class CustomTagDescriptor(RawDescriptor): ...@@ -60,7 +60,6 @@ class CustomTagDescriptor(RawDescriptor):
template = Template(template_module_data) template = Template(template_module_data)
return template.render(**params) return template.render(**params)
@property @property
def rendered_html(self): def rendered_html(self):
return self.render_template(self.system, self.data) return self.render_template(self.system, self.data)
......
...@@ -22,7 +22,6 @@ class TestBulkAssertionTestCase(BulkAssertionTest): ...@@ -22,7 +22,6 @@ class TestBulkAssertionTestCase(BulkAssertionTest):
def test_passing_asserts_passthrough(self, assertion, *args): def test_passing_asserts_passthrough(self, assertion, *args):
getattr(self, assertion)(*args) getattr(self, assertion)(*args)
@ddt.data( @ddt.data(
('assertTrue', False), ('assertTrue', False),
('assertFalse', True), ('assertFalse', True),
......
...@@ -1395,7 +1395,6 @@ class CapaModuleTest(unittest.TestCase): ...@@ -1395,7 +1395,6 @@ class CapaModuleTest(unittest.TestCase):
Run the test for each possible rerandomize value Run the test for each possible rerandomize value
""" """
def _reset_and_get_seed(module): def _reset_and_get_seed(module):
""" """
Reset the XModule and return the module's seed Reset the XModule and return the module's seed
......
...@@ -150,7 +150,6 @@ class ImportTestCase(BaseCourseTestCase): ...@@ -150,7 +150,6 @@ class ImportTestCase(BaseCourseTestCase):
self.assertNotEqual(descriptor1.location, descriptor2.location) self.assertNotEqual(descriptor1.location, descriptor2.location)
def test_reimport(self): def test_reimport(self):
'''Make sure an already-exported error xml tag loads properly''' '''Make sure an already-exported error xml tag loads properly'''
......
...@@ -211,7 +211,6 @@ class XModuleMixin(XBlockMixin): ...@@ -211,7 +211,6 @@ class XModuleMixin(XBlockMixin):
def runtime(self, value): def runtime(self, value):
self._runtime = value self._runtime = value
@property @property
def system(self): def system(self):
""" """
...@@ -719,7 +718,6 @@ class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock): ...@@ -719,7 +718,6 @@ class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock):
entry_point = "xmodule.v1" entry_point = "xmodule.v1"
module_class = XModule module_class = XModule
# VS[compat]. Backwards compatibility code that can go away after # VS[compat]. Backwards compatibility code that can go away after
# importing 2012 courses. # importing 2012 courses.
# A set of metadata key conversions that we want to make # A set of metadata key conversions that we want to make
...@@ -835,7 +833,6 @@ class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock): ...@@ -835,7 +833,6 @@ class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock):
""" """
pass pass
# =============================== BUILTIN METHODS ========================== # =============================== BUILTIN METHODS ==========================
def __eq__(self, other): def __eq__(self, other):
return (self.scope_ids == other.scope_ids and return (self.scope_ids == other.scope_ids and
......
...@@ -29,7 +29,6 @@ class AnnotatableProblemTest(UniqueCourseTest): ...@@ -29,7 +29,6 @@ class AnnotatableProblemTest(UniqueCourseTest):
USERNAME = "STAFF_TESTER" USERNAME = "STAFF_TESTER"
EMAIL = "johndoe@example.com" EMAIL = "johndoe@example.com"
DATA_TEMPLATE = dedent("""\ DATA_TEMPLATE = dedent("""\
<annotatable> <annotatable>
<instructions>Instruction text</instructions> <instructions>Instruction text</instructions>
......
...@@ -86,7 +86,6 @@ def cleanup(filepath, remove_meta): ...@@ -86,7 +86,6 @@ def cleanup(filepath, remove_meta):
if attr in attrs: if attr in attrs:
del attrs[attr] del attrs[attr]
with open(filepath, "w") as f: with open(filepath, "w") as f:
f.write(etree.tostring(xml)) f.write(etree.tostring(xml))
......
...@@ -10,7 +10,6 @@ from path import path ...@@ -10,7 +10,6 @@ from path import path
on_rtd = os.environ.get('READTHEDOCS', None) == 'True' on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
sys.path.append('../../../../') sys.path.append('../../../../')
from docs.shared.conf import * from docs.shared.conf import *
...@@ -188,7 +187,6 @@ def strip_tags(html): ...@@ -188,7 +187,6 @@ def strip_tags(html):
return s.get_data() return s.get_data()
def process_docstring(app, what, name, obj, options, lines): def process_docstring(app, what, name, obj, options, lines):
"""Autodoc django models""" """Autodoc django models"""
......
...@@ -179,7 +179,6 @@ def strip_tags(html): ...@@ -179,7 +179,6 @@ def strip_tags(html):
return s.get_data() return s.get_data()
def process_docstring(app, what, name, obj, options, lines): def process_docstring(app, what, name, obj, options, lines):
"""Autodoc django models""" """Autodoc django models"""
......
...@@ -36,7 +36,6 @@ def add_base(paths): ...@@ -36,7 +36,6 @@ def add_base(paths):
return [os.path.join(BASEDIR, x) for x in paths] return [os.path.join(BASEDIR, x) for x in paths]
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
......
...@@ -21,7 +21,6 @@ class Migration(SchemaMigration): ...@@ -21,7 +21,6 @@ class Migration(SchemaMigration):
self.gf('django.db.models.fields.CharField')(max_length=255, null=True), self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
keep_default=False) keep_default=False)
# Changing field 'CourseEmail.course_id' # Changing field 'CourseEmail.course_id'
db.alter_column('bulk_email_courseemail', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) db.alter_column('bulk_email_courseemail', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255))
# Adding field 'CourseEmailTemplate.name' # Adding field 'CourseEmailTemplate.name'
...@@ -29,7 +28,6 @@ class Migration(SchemaMigration): ...@@ -29,7 +28,6 @@ class Migration(SchemaMigration):
self.gf('django.db.models.fields.CharField')(max_length=255, unique=True, null=True), self.gf('django.db.models.fields.CharField')(max_length=255, unique=True, null=True),
keep_default=False) keep_default=False)
# Changing field 'CourseAuthorization.course_id' # Changing field 'CourseAuthorization.course_id'
db.alter_column('bulk_email_courseauthorization', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255)) db.alter_column('bulk_email_courseauthorization', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255))
...@@ -43,13 +41,11 @@ class Migration(SchemaMigration): ...@@ -43,13 +41,11 @@ class Migration(SchemaMigration):
# Deleting field 'CourseEmail.from_addr' # Deleting field 'CourseEmail.from_addr'
db.delete_column('bulk_email_courseemail', 'from_addr') db.delete_column('bulk_email_courseemail', 'from_addr')
# Changing field 'CourseEmail.course_id' # Changing field 'CourseEmail.course_id'
db.alter_column('bulk_email_courseemail', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) db.alter_column('bulk_email_courseemail', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255))
# Deleting field 'CourseEmailTemplate.name' # Deleting field 'CourseEmailTemplate.name'
db.delete_column('bulk_email_courseemailtemplate', 'name') db.delete_column('bulk_email_courseemailtemplate', 'name')
# Changing field 'CourseAuthorization.course_id' # Changing field 'CourseAuthorization.course_id'
db.alter_column('bulk_email_courseauthorization', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255, unique=True)) db.alter_column('bulk_email_courseauthorization', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255, unique=True))
......
...@@ -238,7 +238,6 @@ class StorageTestBase(object): ...@@ -238,7 +238,6 @@ class StorageTestBase(object):
self.field_data_cache = FieldDataCache([self.mock_descriptor], course_id, self.user) self.field_data_cache = FieldDataCache([self.mock_descriptor], course_id, self.user)
self.kvs = DjangoKeyValueStore(self.field_data_cache) self.kvs = DjangoKeyValueStore(self.field_data_cache)
def test_set_and_get_existing_field(self): def test_set_and_get_existing_field(self):
self.kvs.set(self.key_factory('existing_field'), 'test_value') self.kvs.set(self.key_factory('existing_field'), 'test_value')
self.assertEquals('test_value', self.kvs.get(self.key_factory('existing_field'))) self.assertEquals('test_value', self.kvs.get(self.key_factory('existing_field')))
......
...@@ -98,7 +98,6 @@ class Command(BaseCommand): ...@@ -98,7 +98,6 @@ class Command(BaseCommand):
name = raw_input('Full name: ') name = raw_input('Full name: ')
user = User(username=uname, email=email, is_active=True) user = User(username=uname, email=email, is_active=True)
user.set_password(password) user.set_password(password)
try: try:
......
...@@ -147,7 +147,6 @@ def manage_modulestores(request, reload_dir=None, commit_id=None): ...@@ -147,7 +147,6 @@ def manage_modulestores(request, reload_dir=None, commit_id=None):
else: else:
html += '<ul><li>%s</li></ul>' % escape(data) html += '<ul><li>%s</li></ul>' % escape(data)
#---------------------------------------- #----------------------------------------
html += '<hr width="100%"/>' html += '<hr width="100%"/>'
......
...@@ -144,7 +144,6 @@ def ajax_status(request): ...@@ -144,7 +144,6 @@ def ajax_status(request):
if not request.user.is_authenticated(): if not request.user.is_authenticated():
raise PermissionDenied raise PermissionDenied
qs = UserPreference.objects.filter( qs = UserPreference.objects.filter(
user=request.user, user=request.user,
key=NOTIFICATION_PREF_KEY key=NOTIFICATION_PREF_KEY
......
...@@ -16,12 +16,10 @@ class Migration(SchemaMigration): ...@@ -16,12 +16,10 @@ class Migration(SchemaMigration):
)) ))
db.send_create_signal('shoppingcart', ['Donation']) db.send_create_signal('shoppingcart', ['Donation'])
def backwards(self, orm): def backwards(self, orm):
# Deleting model 'Donation' # Deleting model 'Donation'
db.delete_table('shoppingcart_donation') db.delete_table('shoppingcart_donation')
models = { models = {
'auth.group': { 'auth.group': {
'Meta': {'object_name': 'Group'}, 'Meta': {'object_name': 'Group'},
......
...@@ -17,12 +17,10 @@ class Migration(SchemaMigration): ...@@ -17,12 +17,10 @@ class Migration(SchemaMigration):
)) ))
db.send_create_signal('shoppingcart', ['DonationConfiguration']) db.send_create_signal('shoppingcart', ['DonationConfiguration'])
def backwards(self, orm): def backwards(self, orm):
# Deleting model 'DonationConfiguration' # Deleting model 'DonationConfiguration'
db.delete_table('shoppingcart_donationconfiguration') db.delete_table('shoppingcart_donationconfiguration')
models = { models = {
'auth.group': { 'auth.group': {
'Meta': {'object_name': 'Group'}, 'Meta': {'object_name': 'Group'},
......
...@@ -59,7 +59,6 @@ class Migration(SchemaMigration): ...@@ -59,7 +59,6 @@ class Migration(SchemaMigration):
self.gf('django.db.models.fields.CharField')(default='personal', max_length=32), self.gf('django.db.models.fields.CharField')(default='personal', max_length=32),
keep_default=False) keep_default=False)
def backwards(self, orm): def backwards(self, orm):
# Deleting model 'CourseRegCodeItem' # Deleting model 'CourseRegCodeItem'
db.delete_table('shoppingcart_courseregcodeitem') db.delete_table('shoppingcart_courseregcodeitem')
...@@ -88,7 +87,6 @@ class Migration(SchemaMigration): ...@@ -88,7 +87,6 @@ class Migration(SchemaMigration):
# Deleting field 'Order.order_type' # Deleting field 'Order.order_type'
db.delete_column('shoppingcart_order', 'order_type') db.delete_column('shoppingcart_order', 'order_type')
models = { models = {
'auth.group': { 'auth.group': {
'Meta': {'object_name': 'Group'}, 'Meta': {'object_name': 'Group'},
......
...@@ -18,7 +18,6 @@ class Migration(SchemaMigration): ...@@ -18,7 +18,6 @@ class Migration(SchemaMigration):
self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now),
keep_default=False) keep_default=False)
def backwards(self, orm): def backwards(self, orm):
# Deleting field 'OrderItem.created' # Deleting field 'OrderItem.created'
db.delete_column('shoppingcart_orderitem', 'created') db.delete_column('shoppingcart_orderitem', 'created')
...@@ -26,7 +25,6 @@ class Migration(SchemaMigration): ...@@ -26,7 +25,6 @@ class Migration(SchemaMigration):
# Deleting field 'OrderItem.modified' # Deleting field 'OrderItem.modified'
db.delete_column('shoppingcart_orderitem', 'modified') db.delete_column('shoppingcart_orderitem', 'modified')
models = { models = {
'auth.group': { 'auth.group': {
'Meta': {'object_name': 'Group'}, 'Meta': {'object_name': 'Group'},
......
...@@ -263,7 +263,6 @@ class CyberSourceTests(TestCase): ...@@ -263,7 +263,6 @@ class CyberSourceTests(TestCase):
# finally, tests an accepted order # finally, tests an accepted order
self.assertTrue(payment_accepted(params)['accepted']) self.assertTrue(payment_accepted(params)['accepted'])
@patch('shoppingcart.processors.CyberSource.render_to_string', autospec=True) @patch('shoppingcart.processors.CyberSource.render_to_string', autospec=True)
def test_render_purchase_form_html(self, render): def test_render_purchase_form_html(self, render):
""" """
......
...@@ -310,7 +310,6 @@ class PhotoVerification(StatusModel): ...@@ -310,7 +310,6 @@ class PhotoVerification(StatusModel):
return (status, error_msg) return (status, error_msg)
def parsed_error_msg(self): def parsed_error_msg(self):
""" """
Sometimes, the error message we've received needs to be parsed into Sometimes, the error message we've received needs to be parsed into
...@@ -777,7 +776,6 @@ class SoftwareSecurePhotoVerification(PhotoVerification): ...@@ -777,7 +776,6 @@ class SoftwareSecurePhotoVerification(PhotoVerification):
return header_txt + "\n\n" + body_txt return header_txt + "\n\n" + body_txt
def send_request(self): def send_request(self):
""" """
Assembles a submission to Software Secure and sends it via HTTPS. Assembles a submission to Software Secure and sends it via HTTPS.
......
...@@ -9,7 +9,6 @@ import paver.easy ...@@ -9,7 +9,6 @@ import paver.easy
from paver.easy import BuildFailure from paver.easy import BuildFailure
class TestGetReportFiles(unittest.TestCase): class TestGetReportFiles(unittest.TestCase):
""" """
Ensure only the report files we want are returned as part of run_quality. Ensure only the report files we want are returned as part of run_quality.
......
...@@ -95,7 +95,6 @@ class AcceptanceTestSuite(TestSuite): ...@@ -95,7 +95,6 @@ class AcceptanceTestSuite(TestSuite):
if not self.fasttest: if not self.fasttest:
self._setup_acceptance_db() self._setup_acceptance_db()
def _setup_acceptance_db(self): def _setup_acceptance_db(self):
""" """
TODO: Improve the following TODO: Improve the following
......
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