django-navigation / run_tests.py

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from django.conf import settings
from django.core.management import call_command


settings.configure(
    INSTALLED_APPS = (
        'navigation',
        'django_coverage',
        'django.contrib.flatpages',
    ),
    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.sqlite3',
            'NAME': ':memory:',
        }
    },
    ROOT_URLCONF = '',
    COVERAGE_REPORT_HTML_OUTPUT_DIR = 'cover',
    NAVIGATION_URL_MAP = {
        '/mapped/url/string/': 'string mapped by url',
        '/mapped/url/callable/': lambda request: 'callable mapped by url',
    },
    NAVIGATION_NAME_MAP = {
        'mapped-name-string': 'string mapped by name',
        'mapped-name-callable': lambda request: 'callable mapped by name',
    },
    MIDDLEWARE_CLASSES = (
        'django.middleware.common.CommonMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
        'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
    ),
)

if __name__ == "__main__":
    call_command('test_coverage', 'navigation')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.