Install pre-commit hooks:
pip install pre-commit
pre-commit install
Install dependencies:
poetry install
This project uses a comprehensive test suite powered by unittest
.
To run tests:
docker-compose up postgres -d
DJANGO_SETTINGS_MODULE=settings poetry run python -m unittest discover -s tests
Integration tests run locally.
The django_async_backend.db.backends.postgresql
backend is fully compatible with Django's default django.db.backends.postgresql
backend, as it leverages the default implementation under the hood. To confirm this compatibility, run Django's test suite using the custom backend.
DATABASES = {
"default": {
"ENGINE": "django_async_backend.db.backends.postgresql",
...
},
"other": {
"ENGINE": "django_async_backend.db.backends.postgresql",
...
},
}
To execute them:
cd tests_django
docker-compose run --build --rm test_django_integration