Ticket #21270: E701.diff

File E701.diff, 1.8 KB (added by Tim Graham, 11 years ago)
  • tests/decorators/tests.py

    diff --git a/tests/decorators/tests.py b/tests/decorators/tests.py
    index 2aaea49..66a98fa 100644
    a b class DecoratorsTest(TestCase):  
    9494        callback = user_passes_test(test1)(callback)
    9595        callback = user_passes_test(test2)(callback)
    9696
    97         class DummyUser(object): pass
    98         class DummyRequest(object): pass
     97        class DummyUser(object):
     98            pass
     99
     100        class DummyRequest(object):
     101            pass
    99102
    100103        request = DummyRequest()
    101104        request.user = DummyUser()
  • tests/forms_tests/tests/test_error_messages.py

    diff --git a/tests/forms_tests/tests/test_error_messages.py b/tests/forms_tests/tests/test_error_messages.py
    index 2cfe6f3..818556c 100644
    a b class FormsErrorMessagesTestCase(TestCase, AssertFormErrorsMixin):  
    224224                return self.as_divs()
    225225
    226226            def as_divs(self):
    227                 if not self: return ''
     227                if not self:
     228                    return ''
    228229                return mark_safe('<div class="error">%s</div>' % ''.join('<p>%s</p>' % e for e in self))
    229230
    230231        # This form should print errors the default way.
  • tests/forms_tests/tests/test_extra.py

    diff --git a/tests/forms_tests/tests/test_extra.py b/tests/forms_tests/tests/test_extra.py
    index 136d113..f66241c 100644
    a b class FormsExtraTestCase(TestCase, AssertFormErrorsMixin):  
    727727                return self.as_divs()
    728728
    729729            def as_divs(self):
    730                 if not self: return ''
     730                if not self:
     731                    return ''
    731732                return '<div class="errorlist">%s</div>' % ''.join('<div class="error">%s</div>' % force_text(e) for e in self)
    732733
    733734        class CommentForm(Form):
Back to Top