Ticket #3396: test_2.3.patch
File test_2.3.patch, 2.1 KB (added by , 18 years ago) |
---|
-
django/http/__init__.py
52 52 POST = MultiValueDict() 53 53 FILES = MultiValueDict() 54 54 for submessage in msg.get_payload(): 55 if isinstance(submessage, email.Message.Message):55 if submessage and isinstance(submessage, email.Message.Message): 56 56 name_dict = parse_header(submessage['Content-Disposition'])[1] 57 57 # name_dict is something like {'name': 'file', 'filename': 'test.txt'} for file uploads 58 58 # or {'name': 'blah'} for POST fields -
django/newforms/widgets.py
235 235 236 236 def __unicode__(self): 237 237 "Outputs a <ul> for this set of radio fields." 238 return u'<ul>\n%s\n</ul>' % u'\n'.join([u'<li>%s</li>' % wfor w in self])238 return u'<ul>\n%s\n</ul>' % u'\n'.join([u'<li>%s</li>' % unicode(w) for w in self]) 239 239 240 240 class RadioSelect(Select): 241 241 def render(self, name, value, attrs=None, choices=()): -
tests/modeltests/test_client/models.py
89 89 90 90 # Request a page that requires a login 91 91 response = self.client.login('/test_client/login_protected_view/', 'testclient', 'password') 92 self. assertTrue(response)92 self.failUnless(response) 93 93 self.assertEqual(response.status_code, 200) 94 94 self.assertEqual(response.context['user'].username, 'testclient') 95 95 self.assertEqual(response.template.name, 'Login Template') … … 98 98 "Request a page that is protected with @login, but use bad credentials" 99 99 100 100 response = self.client.login('/test_client/login_protected_view/', 'otheruser', 'nopassword') 101 self. assertFalse(response)101 self.failIf(response)