mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-05-13 03:32:18 -04:00
Bugfix catch attribute errors and updated dependencies
This commit is contained in:
parent
8689aa3c31
commit
71b00c2098
7 changed files with 491 additions and 816 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue