5 from django.core.management.base import BaseCommand, CommandError
6 from django.conf import settings as django_settings
8 from forum import settings
10 class Command(BaseCommand):
11 args = '<test1 test2 test3 ...>'
12 help = 'Closes the specified poll for voting'
14 def handle(self, *args, **options):
15 # Try to load Selenium.
18 print "Selenium has been successfully loaded"
20 logging.error("Couldn't load selenium")
21 exit("Python Selenium couldn't be loaded: pip install selenium")
24 TEST_FOLDER = '%s/forum/skins/%s/tests' % (django_settings.SITE_SRC_ROOT, django_settings.OSQA_DEFAULT_SKIN)
26 # Check if the UI tests folder exists
27 if os.path.exists(TEST_FOLDER):
28 print 'Loading UI tests from %s' % TEST_FOLDER
30 exit("UI tests folder couldn't be loaded")