Bugfix catch attribute errors and updated dependencies

This commit is contained in:
jfriedli 2022-01-24 19:43:12 +00:00
parent 8689aa3c31
commit 71b00c2098
7 changed files with 491 additions and 816 deletions

View file

@ -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(