diff options
Diffstat (limited to 'tests.py')
| -rw-r--r-- | tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -19,6 +19,11 @@ class FlaskrTestCase(unittest.TestCase): | |||
| 19 | rv = self.app.get('/') | 19 | rv = self.app.get('/') |
| 20 | self.assertIn(b'mat2-web', rv.data) | 20 | self.assertIn(b'mat2-web', rv.data) |
| 21 | 21 | ||
| 22 | def test_check_mimetypes(self): | ||
| 23 | rv = self.app.get('/') | ||
| 24 | self.assertIn(b'application/zip', rv.data) | ||
| 25 | self.assertIn(b'audio/x-flac', rv.data) | ||
| 26 | |||
| 22 | def test_get_download_dangerous_file(self): | 27 | def test_get_download_dangerous_file(self): |
| 23 | rv = self.app.get('/download/\..\filename') | 28 | rv = self.app.get('/download/\..\filename') |
| 24 | self.assertEqual(rv.status_code, 302) | 29 | self.assertEqual(rv.status_code, 302) |
