Skip to main content

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

Install

pip install django-test-helpers

Usage

Create a temporary database:

from testhelpers.dbmanager import TemporaryDatabase

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

Run some commands in transactional isolation:

from testhelpers.dbmanager import Transactionless

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

Download files

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

Source Distribution

django-test-helpers-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file django-test-helpers-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-test-helpers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 58f5a2b5c02ee3fddeec5c2f3269c65b659cff2c69ef75ab12c8ae127a2aecd0
MD5 b0155cf085a4a18b0a77fcd7d9056174
BLAKE2b-256 0a9352da9ba612ba8247c79a64cf28ba19a468afdd5ac89e9343d5685d33b1ba

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page