Skip to content

Sets up and tears down a temporary postgres instance for each test

License

Notifications You must be signed in to change notification settings

csinchok/django-postgres-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-postgres-testing Build Status PyPI version

This package contains a simple Django TestRunner that will setup a temporary postgres instance, and remove it when testing is over.

In my personal use case, this is because I don't really like running postgres all the time on my laptop. Additionally, I don't want to have to worry about making test databases/users for each of my Django projects.

This project solves the issue by running a brand new postgres instance for each test run, deleting all data when the run is over.

Usage

Install the package:

$ pip install django-postgres-testing

Add this to your settings file:

TEST_RUNNER = 'django_postgres_testing.TemporaryPostgresRunner'

About

Sets up and tears down a temporary postgres instance for each test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages