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

def test_filename_overflow(self):

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