Tests which verify the overall behavior of the web platform, usually by making multiple API calls. In some cases, tests directly interact with the database.
-
The development dependencies must be installed in order to run the test suite. To do so, run
pip install .[dev]
from thepicoCTF-web
directory. -
The test suite expects to be able to bring up MongoDB and Redis servers on their default ports. Depending on your system, you may need to modify
pytest.ini
:variable purpose mongo_exec path to mongod
executableredis_exec path to redis-server
executable -
Ensure that the
FLASK_ENV
environment variable is not set in your current shell. Running the Flask app in development mode can be useful for local development, but also modifies Flask's exception handling behavior and will break the tests. -
Run
pytest
from thepicoCTF-web
directory. A code coverage report will also be generated by default at./coverage_report
.