Testing (Pytest)
We use pytest to validate that the functionality of the cms works as expected.
In addition, we use the following plugins:
pytest-cov: This plugin produces coverage reports.
pytest-django: Provide a few helpers for Django
pytest-xdist: Enable distributing tests across multiple CPUs to speed up test execution
Welcome to requests-mock’s documentation!: Mocking requests to external APIs
For more information, see Testing in Django and Writing and running tests.
For reference of our test framework and test cases, see tests.
Coverage
After each run, the test coverage is uploaded to CodeClimate (see upload-test-coverage).
Test API with WebApp
To test the API in the web app with a different CMS server, open the JavaScript console of the web app and execute:
window.localStorage.setItem('api-url', 'https://cms-test.integreat-app.de')