tests.md 932 Bytes
Newer Older
1
Backend tests
2 3 4 5
======

*Rex-DRI* comes in with several *tests* that you can perform locally using the commands `make test_backend` and `make test_frontend` once the project is up and running (`make up`).

6
## General words
7 8 9 10 11 12 13 14 15 16

Testing the backend is handled with a combination of `pytest` and `Django` (and `pytest-django` package).

The tests are found in the `backend_app/tests/` folder and they mostly test the custom behaviors that are implemented in the app such as moderation and versioning.

Also, there are tests regarding some custom validation.

Finally, the initial and example loading data scripts are tested.


17
## Documentation
18 19 20 21 22 23

Some usefull links to get inspired:
- [General information about testing in Django](https://docs.djangoproject.com/fr/2.1/topics/testing/overview/)
- [`pytest` documentation](https://docs.pytest.org/en/latest/)
- [`pytest-django` documentation](https://pytest-django.readthedocs.io/en/latest/)