Skip to main content


Project description

Test helpers, mostly geared around the database. Tested on Django 1.2.


pip install django-test-helpers


Create a temporary database:

from testhelpers.dbmanager import TemporaryDatabase

with TemporaryDatabase(fixtures=['myfixture.json'], db_prefix='test'):
    # do some stuff


If you’re using Nashvegas, the TemporaryDatabase will attempt to automatically migrate your database and preserve executed migrations.

Run some commands in transactional isolation:

from testhelpers.dbmanager import Transactionless

with Transactionless(fixtures=['myfixture.json']):
    # do some stuff

Project details

Download files

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

Files for django-test-helpers, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size django-test-helpers-0.1.0.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page