<filename>django_bootstrap/runtests.py
import os, sys

from django.conf import settings
from django.test.runner import DiscoverRunner

DIRNAME = os.path.dirname(__file__)

settings.configure(
    DEBUG=True,
    DATABASE_ENGINE='django.db.backends.sqlite3',
    DATABASE_NAME=os.path.join(DIRNAME, 'database.db'),
    INSTALLED_APPS=(
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.admin',
        'bootstrap',
        'bootstrap.tests'
    )
)

tr = DiscoverRunner(verbosity=1)
failures = tr.run_tests(['bootstrap', ])
if failures:
    sys.exit(failures)
