Skip to main content

Use a temporary PostgreSQL database with pytest-django

Project description

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.

Limitations

Right now, this plugin can only reconfigure the default database.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file pytest-django-testing-postgresql-0.1.post0.tar.gz.

File metadata

File hashes

Hashes for pytest-django-testing-postgresql-0.1.post0.tar.gz
Algorithm Hash digest
SHA256 78b0c58930084cb4393407b2e5a2a3b8734c627b841ecef7d62d39bbfb8e8a45
MD5 cbbe6a95b5cc342aafeba836a2df42bd
BLAKE2b-256 ac2d6ab9df7502911035fa8e777ae5a11105be80b64010bf8da10dff056b9642

See more details on using hashes here.

File details

Details for the file pytest_django_testing_postgresql-0.1.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_django_testing_postgresql-0.1.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 78e52e3d1b0ef5f906d5d69247dd6ac7dfb10d840bd81abab92f3f8c30872cd3
MD5 dfac065e059fc01dcc2293b5a3bb3d40
BLAKE2b-256 3788e1c8fb9d741ad84c8f118fc2886aa9e9d65d17af2068aad4106b74d65ca0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page