From 71b00c20981eccf92ab7af0dc311543f077e327f Mon Sep 17 00:00:00 2001 From: jfriedli Date: Mon, 24 Jan 2022 19:43:12 +0000 Subject: Bugfix catch attribute errors and updated dependencies --- test/test.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/test.py') 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): ), follow_redirects=False) self.assertEqual(rv.status_code, 302) + def test_get_upload_bad_file_type(self): + rv = self.client.post('/', + data=dict( + file=(io.BytesIO(b"1,2,3 \n 4,5,6"), 'test.csv'), + ), follow_redirects=False) + self.assertEqual(rv.status_code, 200) + self.assertIn(b'The type text/csv could not be cleaned', rv.data) + def test_get_upload_empty_file_redir(self): rv = self.client.post('/', data=dict( -- cgit v1.3