The "views.py" file needs to be tested. You can think of these as "application level tests".
"views.py" contains
URL Handle: Index()
Function: GeojsonCheck()
Function: AllowedFile()
URL Handle: dbtest()
URL Handle: UploadFile()
URL Handles: example url handles
For the above labeled "Function", testing will be the same as testing any other file. Please refer to the Testing Wiki page on information on how to do that (and look at the already written tests).
For the above labeled "URL Handle", testing will be a little more complicated. Here is a link to some examples on how to test the response from a Flask URL Handle: http://flask.pocoo.org/docs/0.10/testing/. This link might not tell you all that you need to know, and its examples might not match up perfectly with our configuration.
Please make your testing robust. For example, when testing the functions, write a test for the ideal scenario (when the parameter is exactly what you would expect it to be), write a test when the parameter is something unexpected, and write a test for when the parameter is None. The same goes for the URL handles where parameters are passed via POST.
The "views.py" file needs to be tested. You can think of these as "application level tests".
"views.py" contains
For the above labeled "Function", testing will be the same as testing any other file. Please refer to the Testing Wiki page on information on how to do that (and look at the already written tests).
For the above labeled "URL Handle", testing will be a little more complicated. Here is a link to some examples on how to test the response from a Flask URL Handle: http://flask.pocoo.org/docs/0.10/testing/. This link might not tell you all that you need to know, and its examples might not match up perfectly with our configuration.
Please make your testing robust. For example, when testing the functions, write a test for the ideal scenario (when the parameter is exactly what you would expect it to be), write a test when the parameter is something unexpected, and write a test for when the parameter is None. The same goes for the URL handles where parameters are passed via POST.