aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests/runtests.py
blob: 3043c7b6a6a9d8091091c99a49f2ca20e82be2ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
'''
Created on Mar 10, 2011

@author: tomchristie
'''
# http://ericholscher.com/blog/2009/jun/29/enable-setuppy-test-your-django-apps/
# http://www.travisswicegood.com/2010/01/17/django-virtualenv-pip-and-fabric/
from django.conf import settings
from django.core.management import call_command

def runtests():
    settings.configure(
        INSTALLED_APPS=(
            'django.contrib.auth',
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'django.contrib.sites',
            'django.contrib.messages',
            'djangorestframework',
        ),
        ROOT_URLCONF='djangorestframework.tests.urls',
        # Django replaces this, but it still wants it. *shrugs*
        DATABASE_ENGINE='sqlite3'
    )
    call_command('test', 'djangorestframework')


if __name__ == '__main__':
    runtests()