Refactored bok-choy directory structure

Added fixtures for course and xblock creation
Added bok-choy Studio tests
Added bok-choy tests for ora self- and ai- assessment
Refactored auto-auth; added staff and course-enrollment options
Removed extra javascript properties from page objects
This commit is contained in:
Will Daly
2014-01-03 13:38:15 -08:00
parent f3f0e8a514
commit 4afd5ea49f
57 changed files with 1524 additions and 450 deletions

View File

@@ -1,4 +1,6 @@
# Settings for bok choy tests
"""
Settings for bok choy tests
"""
import os
from path import path
@@ -11,9 +13,9 @@ from path import path
# This is a convenience for ensuring (a) that we can consistently find the files
# and (b) that the files are the same in Jenkins as in local dev.
os.environ['SERVICE_VARIANT'] = 'bok_choy'
os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname()
os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() #pylint: disable=E1120
from aws import * # pylint: disable=W0401, W0614
from .aws import * # pylint: disable=W0401, W0614
######################### Testing overrides ####################################
@@ -22,13 +24,13 @@ from aws import * # pylint: disable=W0401, W0614
INSTALLED_APPS += ('django_extensions',)
# Redirect to the test_root folder within the repo
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root"
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" #pylint: disable=E1120
GITHUB_REPO_ROOT = (TEST_ROOT / "data").abspath()
LOG_DIR = (TEST_ROOT / "log").abspath()
# Configure Mongo modulestore to use the test folder within the repo
for store in ["default", "direct"]:
MODULESTORE[store]['OPTIONS']['fs_root'] = (TEST_ROOT / "data").abspath()
MODULESTORE[store]['OPTIONS']['fs_root'] = (TEST_ROOT / "data").abspath() #pylint: disable=E1120
# Enable django-pipeline and staticfiles
STATIC_ROOT = (TEST_ROOT / "staticfiles").abspath()
@@ -37,10 +39,14 @@ PIPELINE = True
# Silence noisy logs
import logging
LOG_OVERRIDES = [
('track.middleware', logging.CRITICAL)
('track.middleware', logging.CRITICAL),
('edx.discussion', logging.CRITICAL),
]
for log_name, log_level in LOG_OVERRIDES:
logging.getLogger(log_name).setLevel(log_level)
# Use the auto_auth workflow for creating users and logging them in
FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True
# Unfortunately, we need to use debug mode to serve staticfiles
DEBUG = True