Esempio n. 1
0
    def test_file(self):
        stream = StringIO.StringIO()
        stream.write("""\
Content-Type: application/octet-stream
Content-Length: 1
X-AppEngine-Upload-Creation: 2010-10-01 05:34:00.000000
""")
        stream.seek(0)
        headers = {}
        headers['Content-Type'] = 'image/png; blob-key=foo'

        f = FileStorage(stream=stream, headers=headers)
        self.assertNotEqual(parse_blob_info(f, 'my_field_name'), None)
Esempio n. 2
0
 def test_none(self):
     self.assertEqual(parse_blob_info(None, 'my_field_name'), None)