Created
April 24, 2013 20:46
-
-
Save ErikEvenson/5455439 to your computer and use it in GitHub Desktop.
Supports http://south.aeracode.org/ticket/958. Add this as myapp/management/commands/overloaded_test.py to your project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.management.commands import test | |
from south.management.commands import patch_for_test_db_setup | |
from django.test.utils import get_runner | |
from django.conf import settings | |
TestRunner = get_runner(settings) | |
if hasattr(TestRunner, 'options'): | |
extra_options = TestRunner.options | |
else: | |
extra_options = [] | |
class Command(test.Command): | |
option_list = test.Command.option_list + tuple(extra_options) | |
def handle(self, *args, **kwargs): | |
patch_for_test_db_setup() | |
super(Command, self).handle(*args, **kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Supports http://south.aeracode.org/ticket/958.