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!

A lightweight Django "test" command for quick unittest runs.

Project Description

A lightweight Django litetest command for quick unittest runs.

If you’ve been developing in Django for a while, you probably have plenty of tests written. This is great, but they probably take a long time to run. If you do any sort of Test-Driven Development, slow tests means a frustrating edit-test loop.

django-litetest helps you run quick, lightweight tests by doing a few things:

  • Use in-memory SQLite databases instead of your usual test databases,
  • Use in-memory caches instead of your usual caches,
  • If you’re using South, creates models directly.

With django-litetest, fixing a bug becomes as quick as this:

  1. Add a new test to reproduce the bug,
  2. Run litetest testname,
  3. Edit the code to fix the bug,
  4. Run litetest testname again,
  5. Run test to ensure that all your tests pass.


You can get a copy of the source by using:

$ git clone

This app requires:

  • Python 2.6 or higher,
  • Django 1.3 or higher,
  • SpatiaLite (optional for GIS).

As well, this app is available from PyPi:

$ pip install django-litetest


In your Django settings file:

  • Add 'django_litetest' to INSTALLED_APPS (after 'south' if you are using it),
  • Add 'LITETEST': True to each of the DATABASES you want sped up,
  • Add 'LITETEST': True to each of the CACHES you want sped up,
  • If you are using South, set SOUTH_TESTS_MIGRATE = 'LITETEST' to avoid migrations.

Example settings file


    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'db',
        'USER': 'user',
        'PASSWORD': 'password',
        'HOST': '',
        'PORT': '',
        'LITETEST': True,

    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
        'LOCATION': '',
        'LITETEST': True,


Reporting bugs and submitting patches

Please check our issue tracker for known bugs and feature requests.

We accept pull requests for fixes and new features.


Simon Law <>

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.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(8.7 kB) Copy SHA256 Hash SHA256
Source None Mar 4, 2013

Supported By

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 Google Google Cloud Servers DreamHost DreamHost Log Hosting