Award Badges
You can test the API from the command line using cURL. If you pipe the response to json_pp it will format the returned data.
curl -i \
-u admin2:somepasswd \
-H "Content-Type: application/json" \
-X POST --data '{"email": "[email protected]", "password": "notsecret", "username": "user1"}' http://localhost:8000/users/api/
$ curl -u fred:mypassword http://localhost:8000/users/api/ | json_pp
You can run commands in Docker containers. Some examples are given below:
$ docker-compose exec web sh api_test_scripts/add_user.sh user1
$ docker-compose exec web ./manage.py makemigrations
$ docker-compose exec web ./manage.py migrate
The functional tests use the Firefox web browser and Geckodriver.
The Geckodriver is available from:
https://github.com/mozilla/geckodriver/releases.
You should download and extract it and put it somewhere on your system path, for example, /usr/local/bin if running Linux.