south / south / tests /

import unittest
import os
import sys
from django.conf import settings
from south.hacks import hacks

# Add the tests directory so fakeapp is on sys.path
test_root = os.path.dirname(__file__)

# Note: the individual test files are imported below this.

class Monkeypatcher(unittest.TestCase):

    Base test class for tests that play with the INSTALLED_APPS setting at runtime.

    def create_fake_app(self, name):
        class Fake:
        fake = Fake()
        fake.__name__ = name
            fake.migrations = __import__(name + ".migrations", {}, {}, ['migrations'])
        except ImportError:
        return fake

    def setUp(self):
        Changes the Django environment so we can run tests against our test apps.
        if getattr(self, 'installed_apps', None):
    def tearDown(self):
        Undoes what setUp did.
        if getattr(self, 'installed_apps', None):

# Try importing all tests if asked for (then we can run 'em)
    skiptest = settings.SKIP_SOUTH_TESTS
    skiptest = True

if not skiptest:
    from south.tests.db import *
    from south.tests.db_mysql import *
    from south.tests.logic import *
    from south.tests.autodetection import *
    from south.tests.logger import *
    from south.tests.inspector import *
    from south.tests.freezer import *
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
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.