1
# Copyright 2010 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
6
from openid.consumer.consumer import Consumer
8
from django.core.management.base import BaseCommand
10
from zope.testing import testrunner
13
class Command(BaseCommand):
14
help = "Runs the test suite for the specified applications, or the entire site if no apps are specified."
15
args = "[appname ...]"
17
requires_model_validation = False
19
def run_from_argv(self, argv):
22
def handle(self, *args, **kwargs):
23
# Use the 'default' configuration if one isn't already defined.
24
os.environ.setdefault("LAUNCHPAD_RESULTS_CONFIG", "default")
26
# Prevent any accidental OpenID authentications during the test run.
27
Consumer.begin = lambda *a, **kw: 1/0
29
# Run tests to call manage.py for subprocesses.
30
top_level = os.path.dirname(
33
os.path.dirname(__file__))))
49
testrunner.run(defaults, args, script_parts=script_parts)