Commit 682d85c2 by JonahStanley

Changed feature to being one dictionary

Conflicts:
	common/djangoapps/terrain/browser.py
parent 3746c654
......@@ -76,23 +76,23 @@ DATABASES = {
# Use the auto_auth workflow for creating users and logging them in
MITX_FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True
# HACK
# Setting this flag to false causes imports to not load correctly in the lettuce python files
# We do not yet understand why this occurs. Setting this to true is a stopgap measure
USE_I18N = True
MITX_FEATURES['USE_SAUCE'] = False
MITX_FEATURES['SAUCE_USERNAME'] = '<USERNAME>'
MITX_FEATURES['SAUCE_ACCESS_ID'] = '<ACCESS_ID>'
MITX_FEATURES['SAUCE_BROWSER'] = DesiredCapabilities.CHROME
MITX_FEATURES['SAUCE_PLATFORM'] = 'Linux'
MITX_FEATURES['SAUCE_VERSION'] = ''
MITX_FEATURES['SAUCE_DEVICE'] = ''
MITX_FEATURES['SAUCE_SESSION'] = 'Lettuce Tests'
MITX_FEATURES['SAUCE_BUILD'] = 'CMS TESTS'
MITX_FEATURES['SAUCE_TAGS'] = ''
MITX_FEATURES['SAUCE'] = {
'USE' : False,
'USERNAME' : '<USERNAME>',
'ACCESS_ID' : '<ACCESS_ID>',
'BROWSER' : DesiredCapabilities.CHROME,
'PLATFORM' : 'Linux',
'VERSION' : '',
'DEVICE' : '',
'SESSION' : 'Lettuce Tests',
'BUILD' : 'CMS TESTS',
'TAGS' : ''
}
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS += ('lettuce.django',)
......
......@@ -53,13 +53,14 @@ except ImportError:
config = {"username": settings.MITX_FEATURES.get('SAUCE_USERNAME'),
"access-key": settings.MITX_FEATURES.get('SAUCE_ACCESS_ID')}
desired_capabilities = settings.MITX_FEATURES.get('SAUCE_BROWSER', DesiredCapabilities.CHROME)
desired_capabilities['platform'] = settings.MITX_FEATURES.get('SAUCE_PLATFORM', 'Linux')
desired_capabilities['version'] = settings.MITX_FEATURES.get('SAUCE_VERSION', '')
desired_capabilities['device-type'] = settings.MITX_FEATURES.get('SAUCE_DEVICE', '')
desired_capabilities['name'] = settings.MITX_FEATURES.get('SAUCE_SESSION', 'Lettuce Tests')
desired_capabilities['build'] = settings.MITX_FEATURES.get('SAUCE_BUILD', 'edX Plaform')
desired_capabilities['tags'] = settings.MITX_FEATURES.get('SAUCE_TAGS', '')
SAUCE = settings.MITX_FEATURES.get('SAUCE', {})
desired_capabilities = SAUCE.get('BROWSER', DesiredCapabilities.CHROME)
desired_capabilities['platform'] = SAUCE.get('PLATFORM', 'Linux')
desired_capabilities['version'] = SAUCE.get('VERSION', '')
desired_capabilities['device-type'] = SAUCE.get('DEVICE', '')
desired_capabilities['name'] = SAUCE.get('SESSION', 'Lettuce Tests')
desired_capabilities['build'] = SAUCE.get('BUILD', 'edX Plaform')
desired_capabilities['tags'] = SAUCE.get('TAGS', '')
desired_capabilities['video-upload-on-pass'] = False
desired_capabilities['sauce-advisor'] = False
desired_capabilities['record-screenshots'] = False
......@@ -95,7 +96,7 @@ def initial_setup(server):
while (not success) and num_attempts < MAX_VALID_BROWSER_ATTEMPTS:
# Get a browser session
if settings.MITX_FEATURES.get('USE_SAUCE'):
if SAUCE.get('USE'):
world.browser = Browser(
'remote',
url="http://{}:{}@ondemand.saucelabs.com:80/wd/hub".format(config['username'],config['access-key']),
......@@ -126,7 +127,7 @@ def initial_setup(server):
raise IOError("Could not acquire valid {driver} browser session.".format(driver='remote'))
# Set the browser size to 1280x1024
if not settings.MITX_FEATURES.get('USE_SAUCE'):
if not SAUCE.get('USE'):
world.browser.driver.set_window_size(1280, 1024)
......@@ -177,6 +178,6 @@ def teardown_browser(total):
"""
Quit the browser after executing the tests.
"""
if settings.MITX_FEATURES.get('USE_SAUCE'):
if SAUCE.get('USE'):
set_job_status(jobid, total.scenarios_ran == total.scenarios_passed)
world.browser.quit()
......@@ -89,20 +89,18 @@ MITX_FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True
# We do not yet understand why this occurs. Setting this to true is a stopgap measure
USE_I18N = True
MITX_FEATURES['ENABLE_FEEDBACK_SUBMISSION'] = True
FEEDBACK_SUBMISSION_EMAIL = 'dummy@example.com'
MITX_FEATURES['USE_SAUCE'] = False
MITX_FEATURES['SAUCE_USERNAME'] = '<USERNAME>'
MITX_FEATURES['SAUCE_ACCESS_ID'] = '<ACCESS_ID>'
MITX_FEATURES['SAUCE_BROWSER'] = DesiredCapabilities.CHROME
MITX_FEATURES['SAUCE_PLATFORM'] = 'Linux'
MITX_FEATURES['SAUCE_VERSION'] = ''
MITX_FEATURES['SAUCE_DEVICE'] = ''
MITX_FEATURES['SAUCE_SESSION'] = 'Lettuce Tests'
MITX_FEATURES['SAUCE_BUILD'] = 'LMS TESTS'
MITX_FEATURES['SAUCE_TAGS'] = ''
MITX_FEATURES['SAUCE'] = {
'USE' : False,
'USERNAME' : '<USERNAME>',
'ACCESS_ID' : '<ACCESS_ID>',
'BROWSER' : DesiredCapabilities.CHROME,
'PLATFORM' : 'Linux',
'VERSION' : '',
'DEVICE' : '',
'SESSION' : 'Lettuce Tests',
'BUILD' : 'CMS TESTS',
'TAGS' : ''
}
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS += ('lettuce.django',)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment