mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-02-23 08:39:57 -05:00
Bump coverage
This commit is contained in:
parent
c289edb916
commit
5ce3db7e82
2
main.py
2
main.py
@ -70,5 +70,5 @@ def upload_file():
|
||||
return render_template('index.html', mimetypes=mimetypes)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == '__main__': # pragma: no cover
|
||||
app.run()
|
||||
|
9
tests.py
9
tests.py
@ -47,6 +47,15 @@ class FlaskrTestCase(unittest.TestCase):
|
||||
rv.data)
|
||||
self.assertEqual(rv.status_code, 200)
|
||||
|
||||
def test_get_upload_no_file_name(self):
|
||||
rv = self.app.post('/',
|
||||
data=dict(
|
||||
file=(io.BytesIO(b"aaa"), ''),
|
||||
), follow_redirects=True)
|
||||
self.assertIn(b'No file part', rv.data)
|
||||
self.assertEqual(rv.status_code, 200)
|
||||
|
||||
|
||||
def test_get_upload_harmless_file(self):
|
||||
rv = self.app.post('/',
|
||||
data=dict(
|
||||
|
Loading…
x
Reference in New Issue
Block a user