- Go to this link to download db.sqlite3 and copy and paste it into the root directory.
- Initialize a virtual environment by running
virtualenv env
. If it succeeds, proceed to step 5. - Install pip with
curl -O https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
. - Install virtualenv with
sudo pip install virtualenv
. source env/bin/activate
pip install -r requirements.txt
- Create an admin user by typing
python manage.py createsuperuser
in the root directory. ./manage.py migrate
./manage.py collectstatic
./manage.py runserver
Now you can proceed to the browser and check the following urls:
The first url is where you can locate all the existing models in the apps and the second url gives an example flow for api_1 app. Please read further instructions in each app to find more details.
IMPORTANT: please go to 'test' folder in each app ('api_1' and 'api_2') to complete writing unit tests.
You can test each test case after writing it by tying the following:
py.test path/to/test.py -k 'test_method_name'
Refer to Django's official reference page for testing here. You can learn more about pytest here.
You can check code test coverage by typing the following:
py.test --cov-config .coveragerc --cov ./
You can learn more about code coverage here.