summaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests.py')
-rw-r--r--tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests.py b/tests.py
index 9f56079..456cb4d 100644
--- a/tests.py
+++ b/tests.py
@@ -47,6 +47,15 @@ class FlaskrTestCase(unittest.TestCase):
47 rv.data) 47 rv.data)
48 self.assertEqual(rv.status_code, 200) 48 self.assertEqual(rv.status_code, 200)
49 49
50 def test_get_upload_no_file_name(self):
51 rv = self.app.post('/',
52 data=dict(
53 file=(io.BytesIO(b"aaa"), ''),
54 ), follow_redirects=True)
55 self.assertIn(b'No file part', rv.data)
56 self.assertEqual(rv.status_code, 200)
57
58
50 def test_get_upload_harmless_file(self): 59 def test_get_upload_harmless_file(self):
51 rv = self.app.post('/', 60 rv = self.app.post('/',
52 data=dict( 61 data=dict(