Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!


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

Release History

This version
History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(5.0 kB) Copy SHA256 Hash SHA256
Source Oct 23, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting