Commit bb7cbf4d by JonahStanley

If sauce is not enabled, allow full range of ports

Forgot an import
parent 4c3dcda7
...@@ -18,7 +18,7 @@ DEBUG = True ...@@ -18,7 +18,7 @@ DEBUG = True
import logging import logging
logging.disable(logging.ERROR) logging.disable(logging.ERROR)
import os import os
from random import choice from random import choice, randint
def seed(): def seed():
...@@ -84,5 +84,5 @@ USE_I18N = True ...@@ -84,5 +84,5 @@ USE_I18N = True
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command # Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS += ('lettuce.django',) INSTALLED_APPS += ('lettuce.django',)
LETTUCE_APPS = ('contentstore',) LETTUCE_APPS = ('contentstore',)
LETTUCE_SERVER_PORT = choice(PORTS) LETTUCE_SERVER_PORT = choice(PORTS) if SAUCE.get('SAUCE_ENABLED') else randint(1024, 65535)
LETTUCE_BROWSER = os.environ.get('LETTUCE_BROWSER', 'chrome') LETTUCE_BROWSER = os.environ.get('LETTUCE_BROWSER', 'chrome')
...@@ -18,7 +18,7 @@ DEBUG = True ...@@ -18,7 +18,7 @@ DEBUG = True
import logging import logging
logging.disable(logging.ERROR) logging.disable(logging.ERROR)
import os import os
from random import choice from random import choice, randint
def seed(): def seed():
...@@ -66,7 +66,7 @@ DATABASES = { ...@@ -66,7 +66,7 @@ DATABASES = {
# Set up XQueue information so that the lms will send # Set up XQueue information so that the lms will send
# requests to a mock XQueue server running locally # requests to a mock XQueue server running locally
XQUEUE_PORT = choice(PORTS) XQUEUE_PORT = choice(PORTS) if SAUCE.get('SAUCE_ENABLED') else randint(1024, 65535)
XQUEUE_INTERFACE = { XQUEUE_INTERFACE = {
"url": "http://127.0.0.1:%d" % XQUEUE_PORT, "url": "http://127.0.0.1:%d" % XQUEUE_PORT,
"django_auth": { "django_auth": {
...@@ -91,5 +91,5 @@ USE_I18N = True ...@@ -91,5 +91,5 @@ USE_I18N = True
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command # Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS += ('lettuce.django',) INSTALLED_APPS += ('lettuce.django',)
LETTUCE_APPS = ('courseware',) LETTUCE_APPS = ('courseware',)
LETTUCE_SERVER_PORT = choice(PORTS) LETTUCE_SERVER_PORT = choice(PORTS) if SAUCE.get('SAUCE_ENABLED') else randint(1024, 65535)
LETTUCE_BROWSER = os.environ.get('LETTUCE_BROWSER', 'chrome') LETTUCE_BROWSER = os.environ.get('LETTUCE_BROWSER', 'chrome')
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