Test in python3.6.
**You should first set the following environment variable that you need. For instance, **
MODE='DEVELOPMENT' # 'DEVELOPMENT', 'TEST' or 'PRODUCTION', default 'DEVELOPMENT'
PRODUCTION_DATABASE_URI="mysql://username:password@localhost:3306/prod?charset=utf8"
DEVELOPMENT_DATABASE_URI="mysql://username:password@localhost:3306/dev?charset=utf8"
TEST_DATABASE_URI="mysql://username:password@localhost:3306/test?charset=utf8"
SECRET_KEY = 'Sdna2MshdG39DOA2skajd'
The default config is in /app/config.py
.
Install dependencies:
pip install -r requirements.txt
Create basic data:
python manage.py gen_basic_data
Create fake data for testing and presentation:
python manage.py gen_fake_data
Start the server at 0.0.0.0:5000
:
python manage.py runserver
Run all the unit tests in TEST mode.
python manage.py test