From 654b1a61b0874d1fb91b13c2bb697f956e28f756 Mon Sep 17 00:00:00 2001 From: David Lyle Date: Mon, 17 Aug 2015 23:54:29 -0600 Subject: [PATCH] Fixes Selenium tests for openstack_dashboard When the javascript autodiscover code was added, it was not added to the test settings. This caused javascript files to be missed and numerous errors in the Selenium tests. This patch fixes the openstack_dashboard part of the Selenium tests only. Co-Authored-By: Richard Jones Partial-Bug: #1475387 Change-Id: Ib8d4d6ee8199e3d62aeeda904b2d67a2d029cce8 --- openstack_dashboard/test/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openstack_dashboard/test/settings.py b/openstack_dashboard/test/settings.py index b1a0c05221..1826f7447d 100644 --- a/openstack_dashboard/test/settings.py +++ b/openstack_dashboard/test/settings.py @@ -15,6 +15,7 @@ import os from horizon.test.settings import * # noqa from horizon.utils import secret_key from openstack_dashboard import exceptions +from openstack_dashboard.static_settings import find_static_files # noqa from openstack_dashboard.static_settings import get_staticfiles_dirs # noqa STATICFILES_DIRS = get_staticfiles_dirs() @@ -22,6 +23,8 @@ STATICFILES_DIRS = get_staticfiles_dirs() TEST_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_PATH = os.path.abspath(os.path.join(TEST_DIR, "..")) STATIC_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'static')) +STATIC_URL = '/static/' +WEBROOT = '/' SECRET_KEY = secret_key.generate_or_read_from_file( os.path.join(TEST_DIR, '.secret_key_store')) @@ -84,6 +87,8 @@ settings.update_dashboards( ) INSTALLED_APPS[0:0] = [] +find_static_files(ROOT_PATH, HORIZON_CONFIG) + # Set to True to allow users to upload images to glance via Horizon server. # When enabled, a file form field will appear on the create image form. # See documentation for deployment considerations.