Use case
This pytest plugin can be used to test a Django application that uses PostgreSQL. It leverages the testing.postgresql module to setup a temporary PostgreSQL database server and injects the configuration for it into Django’s settings. It is intended to be used together with pytest-django.
Requirements
testing.postgresql needs the postgresql server binary available.
How to use
To use, simply install the package in your testing environment and laod the django-testing-psotgresql plugin when running pytest (pytest normally auto-discovers it).
The plugin re-uses the configuration used by pytest-django.
By default, only the default database is setup. You can modify this by setting PYTEST_SETUP_DATABASES to a list of database aliases in your settings module. The list can contain strings, or tuples if you want some aliases to share the same database backend.
Metadata
Release files for pytest-django-testing-postgresql 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-django-testing-postgresql-0.2.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_django_testing_postgresql-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.4 kB
Release files / pytest-django-testing-postgresql-0.2.tar.gz
| Download URL | pytest-django-testing-postgresql-0.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c256e262f144fbb0c717d592a649dbfe2852f4648c53c1a011cf48ccd8e0762
|
|
BLAKE2b-256 checksum How to use checksums |
81eabf20af6bd0a88846b7875b3e4feea8d446b1d6010615aa72f853aa425e15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.6.4 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.10
|
Release files / pytest_django_testing_postgresql-0.2-py3-none-any.whl
| Download URL | pytest_django_testing_postgresql-0.2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd5807ae4d121920f6f10c42ccea5dec9f4a204c0ae1ea82adad29f59ac8a7c4
|
|
BLAKE2b-256 checksum How to use checksums |
11bd40afceaea1ad0b440bc9426b1dcaac891c0710ec496dca777a3c2498cf2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.6.4 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.10
|