'File names over 256 characters (dangerous on some platforms) get fixed up.'

def test_filename_overflow(self):

    name = ('%s.txt' % ('f' * 500))
    payload = '\r\n'.join([('--' + client.BOUNDARY), ('Content-Disposition:    form-data;    name="file";    filename="%s"' % name), 'Content-Type:    application/octet-stream', '', (('Oops.--' + client.BOUNDARY) + '--'), ''])
    r = {'CONTENT_LENGTH': len(payload), 'CONTENT_TYPE': client.MULTIPART_CONTENT, 'PATH_INFO': '/file_uploads/echo/', 'REQUEST_METHOD': 'POST', 'wsgi.input': client.FakePayload(payload)}
    got = simplejson.loads(self.client.request(**r).content)
    self.assertTrue((len(got['file']) < 256), ('Got    a    long    file    name    (%s    characters).' % len(got['file'])))
