From b7006533a263558f226257bf12f2626a6960894a Mon Sep 17 00:00:00 2001 From: Brian Beggs <bbeggs@edx.org> Date: Tue, 1 Sep 2015 17:26:07 -0400 Subject: [PATCH] updating lettuce to work with Django 1.4 - 1.8 --- cms/envs/acceptance.py | 4 +++- common/djangoapps/terrain/browser.py | 1 + requirements/edx/base.txt | 1 - requirements/edx/github.txt | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index a97c047..242463a 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -98,7 +98,9 @@ FEATURES['ENABLE_DISCUSSION_SERVICE'] = False USE_I18N = True # Include the lettuce app for acceptance testing, including the 'harvest' django-admin command -INSTALLED_APPS += ('lettuce.django',) +# django.contrib.staticfiles used to be loaded by lettuce, now we must add it ourselves +# django.contrib.staticfiles is not added to lms as there is a ^/static$ route built in to the app +INSTALLED_APPS += ('lettuce.django', 'django.contrib.staticfiles') LETTUCE_APPS = ('contentstore',) LETTUCE_BROWSER = os.environ.get('LETTUCE_BROWSER', 'chrome') diff --git a/common/djangoapps/terrain/browser.py b/common/djangoapps/terrain/browser.py index e603c90..2e9da01 100644 --- a/common/djangoapps/terrain/browser.py +++ b/common/djangoapps/terrain/browser.py @@ -120,6 +120,7 @@ def initial_setup(server): world.visit('/') except WebDriverException: + LOGGER.warn("Error acquiring %s browser, retrying", browser_driver, exc_info=True) if hasattr(world, 'browser'): world.browser.quit() num_attempts += 1 diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 537584d..d591c79 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -130,7 +130,6 @@ django_nose==1.4.1 factory_boy==2.2.1 flaky==2.0.3 freezegun==0.1.11 -lettuce==0.2.20 mock-django==0.6.6 mock==1.0.1 moto==0.3.1 diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 8a2bf2c..4a5f50f 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -30,6 +30,8 @@ git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c # custom opaque-key implementations for ccx -e git+https://github.com/jazkarta/ccx-keys.git@e6b03704b1bb97c1d2f31301ecb4e3a687c536ea#egg=ccx-keys git+https://github.com/edx/rfc6266.git@v0.0.5-edx#egg=rfc6266==0.0.5-edx +# Used for testing +-e git+https://github.com/gabrielfalcao/lettuce.git@b18b8fb711eb7a178c58574716032ad8de525912#egg=lettuce=1.8-support # Our libraries: -e git+https://github.com/edx/XBlock.git@32fca2a954745315be97b91ef0d5ad4eb38cf365#egg=XBlock -- libgit2 0.26.0