@@ -0,0 +1,2228 @@
+%22%22%22%0ASource: http://datadesk.latimes.com/posts/2012/06/test-your-django-app-with-travisci/%0ASlightly modified by Nicolas Kuttler.%0A%22%22%22%0A%0Aimport os%0Aimport sys%0Aimport argparse%0A%0Afrom django.conf import settings%0A%0A%0Aclass QuickDjangoTest(object):%0A    %22%22%22%0A    A quick way to run the Django test suite without a fully-configured project.%0A%0A    Example usage:%0A%0A        %3E%3E%3E QuickDjangoTest('app1', 'app2')%0A%0A    Based on a script published by Lukasz Dziedzia at:%0A    http://stackoverflow.com/questions/3841725/how-to-launch-tests-for-django-reusable-app%0A    %22%22%22%0A    DIRNAME = os.path.dirname(__file__)%0A    INSTALLED_APPS = (%0A        'django.contrib.auth',%0A        'django.contrib.contenttypes',%0A        'django.contrib.sessions',%0A        'django.contrib.admin',%0A    )%0A    WEBMASTER_VERIFICATION = %7B%7D%0A%0A    def __init__(self, apps, *args, **kwargs):%0A        self.apps = apps%0A        self._tests()%0A%0A    def _tests(self):%0A        %22%22%22%0A        Fire up the Django test suite developed for version 1.2%0A        %22%22%22%0A        settings.configure(%0A            DEBUG = True,%0A            DATABASES = %7B%0A                'default': %7B%0A                    'ENGINE': 'django.db.backends.sqlite3',%0A                    'NAME': os.path.join(self.DIRNAME, 'database.db'),%0A                    'USER': '',%0A                    'PASSWORD': '',%0A                    'HOST': '',%0A                    'PORT': '',%0A                %7D%0A            %7D,%0A            INSTALLED_APPS = self.INSTALLED_APPS + tuple(self.apps),%0A            # ROOT_URLCONF = 'test_project.urls',%0A            TEMPLATE_DIRS = (%0A                # './test_project/templates/',%0A            ),%0A        )%0A        from django.test.simple import DjangoTestSuiteRunner%0A        failures = DjangoTestSuiteRunner().run_tests(self.apps, verbosity=1)%0A        if failures:%0A            sys.exit(failures)%0A%0A%0Aif __name__ == '__main__':%0A    %22%22%22%0A    What do when the user hits this file from the shell.%0A%0A    Example usage:%0A%0A        $ python quicktest.py app1 app2%0A%0A    %22%22%22%0A    parser = argparse.ArgumentParser(%0A        usage=%22%5Bargs%5D%22,%0A        description=%22Run Django tests on the provided applications.%22%0A    )%0A    parser.add_argument('apps', nargs='+', type=str)%0A    options = parser.parse_args()%0A    QuickDjangoTest(options.apps)%0A

support for testing without entire project setup