Technical test as Python developer in retoglobal
- Open a terminal.
- Download the source code.
- Create a virtualenv or virtualenwrapper with python 3.x.
- Redis and mysql should be intalled and running.
- Install the requirements.
- Open mysql:
$ mysql -u root -p -h 127.0.0.1
CREATE DATABASE <DATABASE_NAME>;
CREATE USER '<USERNAME>'@'<HOST>' IDENTIFIED BY '<PASSWORD>';
GRANT ALL PRIVILEGES ON <DATABASE_NAME>.* TO 'USERNAME'@'HOST';
GRANT ALL PRIVILEGES ON test_<DATABASE_NAME>.* TO 'USERNAME'@'HOST';
- Run it inside the project path:
$ ./manage.py migrate
$ ./manage.py runserver
- Then you can query the API with Postman.
- To run the tests:
$ ./manage.py tests