import os
import sys

os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'

from django.core import management

apps = sys.argv[1:]

if not apps:
    apps = [
        'resources',
        'forms',
        'base',
    ]

management.call_command('test', *apps, interactive=False)

import os
import sys

os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'

import django
if hasattr(django, 'setup'):
    django.setup()

from django.core import management

apps = sys.argv[1:]

if not apps:
    apps = [
        'resources',
        'forms',
        'base',
    ]

management.call_command('test', *apps, interactive=False)

Call setup() before testing on Django 1.7+
Call setup() before testing on Django 1.7+

Signed-off-by: Don Naegely <e690a32c1e2176a2bfface09e204830e1b5491e3@gmail.com>
