The talk presented at PythonDay 2017 can be found interactively at https://pythondaymx.github.io/taller_testing or as PDF in talk.pdf.
No te asustes que la presentación es en inglés. La platicá sería en español 😅.
This example project implements a small app named "networker" that can draw force layouts for a directory of JSON graphs.
For Python 2:
pip install virtualenv
cd pytest_tutorial
pyvenv env
source env/bin/activateFor Python 3:
cd pytest_tutorial
python3 -m venv env
source env/bin/activateRun the following in the pytest_tutorial folder.
# May be pip3 on your system
pip install --user pytest pytest-cov
pip install --user -e .Run the app in the pytest_tutorial folder with
# may be python3 on your system
python -m networkerOpen your browser at https://localhost:5000/miserables and check whether you see the graph.
In total the app has the following routes:
/<filename>- create the graph for the file<filename>(you can omit the extension)/json/<filename>- get the JSON from a file<filename>/validate/<filename>- check whether<filename>contains a valid JSON graph