Added testcase for the debug behavior and explicit encoding

This commit is contained in:
Armin Ronacher 2011-08-05 16:56:43 +02:00
parent 3400b78db2
commit f3db68c8ce
2 changed files with 21 additions and 1 deletions

View file

@ -27,7 +27,7 @@ class DebugFilesKeyError(KeyError, AssertionError):
buf.append('\n\nThe browser instead transmitted some file names. '
'This was submitted: %s' % ', '.join('"%s"' % x
for x in form_matches))
self.msg = ''.join(buf)
self.msg = ''.join(buf).encode('utf-8')
def __str__(self):
return self.msg