In your terminal:
- Clone this repository type: git clone
- change directory to "augmentation" and type: docker-compose up
- In new terminal, enter your web_container type: docker exec -it bash
- Run migrations type: python manage.py migrate
- Load data for testing 5.1 Load test image: type: python images/loaders/test_image_loader.py 5.2 Parse Image to test response JSON file: type: python images/loaders/request_data_loader.py
- Run tests: type: python manage.py test
Though not every test passes the TestCase, converted images are stored in media/img/ directory and their instances are saved on the Postgres database.
In my opinion, this may be related to some caveats with base64 or converting images with PIL.Image(). While testing with Postman, no troubles have occurred, and double/triple/etc. convetrions were possible. I will fix these tests in the future.