Ticket #3396: test_2.3.patch

File test_2.3.patch, 2.1 KB (added by adurdin@…, 18 years ago)

Patch for these three errors (and one more)

  • django/http/__init__.py

     
    5252    POST = MultiValueDict()
    5353    FILES = MultiValueDict()
    5454    for submessage in msg.get_payload():
    55         if isinstance(submessage, email.Message.Message):
     55        if submessage and isinstance(submessage, email.Message.Message):
    5656            name_dict = parse_header(submessage['Content-Disposition'])[1]
    5757            # name_dict is something like {'name': 'file', 'filename': 'test.txt'} for file uploads
    5858            # or {'name': 'blah'} for POST fields
  • django/newforms/widgets.py

     
    235235
    236236    def __unicode__(self):
    237237        "Outputs a <ul> for this set of radio fields."
    238         return u'<ul>\n%s\n</ul>' % u'\n'.join([u'<li>%s</li>' % w for w in self])
     238        return u'<ul>\n%s\n</ul>' % u'\n'.join([u'<li>%s</li>' % unicode(w) for w in self])
    239239
    240240class RadioSelect(Select):
    241241    def render(self, name, value, attrs=None, choices=()):
  • tests/modeltests/test_client/models.py

     
    8989       
    9090        # Request a page that requires a login
    9191        response = self.client.login('/test_client/login_protected_view/', 'testclient', 'password')
    92         self.assertTrue(response)
     92        self.failUnless(response)
    9393        self.assertEqual(response.status_code, 200)
    9494        self.assertEqual(response.context['user'].username, 'testclient')
    9595        self.assertEqual(response.template.name, 'Login Template')
     
    9898        "Request a page that is protected with @login, but use bad credentials"
    9999
    100100        response = self.client.login('/test_client/login_protected_view/', 'otheruser', 'nopassword')
    101         self.assertFalse(response)
     101        self.failIf(response)
Back to Top