diff options
Diffstat (limited to 'test/test.py')
| -rw-r--r-- | test/test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test.py b/test/test.py index d9d0fbf..4d2907f 100644 --- a/test/test.py +++ b/test/test.py | |||
| @@ -58,6 +58,14 @@ class Mat2WebTestCase(TestCase): | |||
| 58 | ), follow_redirects=False) | 58 | ), follow_redirects=False) |
| 59 | self.assertEqual(rv.status_code, 302) | 59 | self.assertEqual(rv.status_code, 302) |
| 60 | 60 | ||
| 61 | def test_get_upload_bad_file_type(self): | ||
| 62 | rv = self.client.post('/', | ||
| 63 | data=dict( | ||
| 64 | file=(io.BytesIO(b"1,2,3 \n 4,5,6"), 'test.csv'), | ||
| 65 | ), follow_redirects=False) | ||
| 66 | self.assertEqual(rv.status_code, 200) | ||
| 67 | self.assertIn(b'The type text/csv could not be cleaned', rv.data) | ||
| 68 | |||
| 61 | def test_get_upload_empty_file_redir(self): | 69 | def test_get_upload_empty_file_redir(self): |
| 62 | rv = self.client.post('/', | 70 | rv = self.client.post('/', |
| 63 | data=dict( | 71 | data=dict( |
