Unit testing Index Page 1

Flask: How to Test file upload

Example on how to test file upload using flask client. Check here how to do a request using the FlaskClient to simulare a file upload. You need to put a tuple in the request payload with the data types: (, ) ex. file': (StringIO('my file contents'), 'test_file.txt'). Check here for a full example