acceptance.py 1.35 KB
Newer Older
1
"""
2 3
This config file extends the test environment configuration 
so that we can run the lettuce acceptance tests.
4
"""
5 6 7 8 9 10
from .test import *

# You need to start the server in debug mode,
# otherwise the browser will not render the pages correctly
DEBUG = True

11 12 13 14 15 16 17 18 19 20 21 22
# Show the courses that are in the data directory
COURSES_ROOT = ENV_ROOT / "data"
DATA_DIR = COURSES_ROOT
MODULESTORE = {
    'default': {
        'ENGINE': 'xmodule.modulestore.xml.XMLModuleStore',
        'OPTIONS': {
            'data_dir': DATA_DIR,
            'default_class': 'xmodule.hidden_module.HiddenDescriptor',
        }
    }
}
23 24 25 26 27 28 29 30 31 32

# Set this up so that rake lms[acceptance] and running the 
# harvest command both use the same (test) database
# which they can flush without messing up your dev db
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': ENV_ROOT / "db" / "test_mitx.db",
        'TEST_NAME': ENV_ROOT / "db" / "test_mitx.db",     
    }
33 34
}

35 36 37 38 39
# Do not display the YouTube videos in the browser while running the
# acceptance tests. This makes them faster and more reliable
MITX_FEATURES['STUB_VIDEO_FOR_TESTING'] = True

# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
40
INSTALLED_APPS += ('lettuce.django',)
41
LETTUCE_APPS = ('portal',)  # dummy app covers the home page, login, registration, and course enrollment