diff options
author | Marcel Hellkamp <marc@gsites.de> | 2017-01-06 13:06:41 +0100 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2017-01-06 13:06:41 +0100 |
commit | 9f44d9651216201ffb1ce868555f9f2fb7cf6b48 (patch) | |
tree | aa6305df5574b07200d4cb9b82e4803836a35b82 /test | |
parent | 5fcbaca48241b331fbf403c98d2a9403ca1ae0cc (diff) | |
download | bottle-9f44d9651216201ffb1ce868555f9f2fb7cf6b48.tar.gz |
fix #918: AttributeError: 'FileUpload' object has no attribute 'get_header'
Diffstat (limited to 'test')
-rw-r--r-- | test/test_fileupload.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_fileupload.py b/test/test_fileupload.py index f69eaf6..f5e2c07 100644 --- a/test/test_fileupload.py +++ b/test/test_fileupload.py @@ -4,7 +4,7 @@ import unittest import sys, os.path import bottle -from bottle import FileUpload, BytesIO +from bottle import FileUpload, BytesIO, tob import tempfile class TestFileUpload(unittest.TestCase): @@ -14,6 +14,10 @@ class TestFileUpload(unittest.TestCase): def test_raw_filename(self): self.assertEqual(FileUpload(None, None, 'x/x').raw_filename, 'x/x') + def test_content_type(self): + fu = FileUpload(None, None, None, {"Content-type": "text/plain"}) + self.assertEqual(fu.content_type, 'text/plain') + def assertFilename(self, bad, good): fu = FileUpload(None, None, bad) self.assertEqual(fu.filename, good) |