diff --git a/django/core/management/commands/test_windmill.py b/django/core/management/commands/test_windmill.py new file mode 100644 index 0000000000..d9b72f9c3e --- /dev/null +++ b/django/core/management/commands/test_windmill.py @@ -0,0 +1,102 @@ +from django.core.management.base import BaseCommand +from windmill.authoring import djangotest +import sys, os +from time import sleep +import types +import logging + +class ServerContainer(object): + start_test_server = djangotest.start_test_server + stop_test_server = djangotest.stop_test_server + +def attempt_import(name, suffix): + try: + mod = __import__(name+'.'+suffix) + except ImportError: + mod = None + if mod is not None: + s = name.split('.') + mod = __import__(s.pop(0)) + for x in s+[suffix]: + mod = getattr(mod, x) + return mod + +class Command(BaseCommand): + + help = "Run windmill tests. Specify a browser, if one is not passed Firefox will be used" + + args = '