From e9e93f98a47b9b7c2da4d24594f8d05eb13eb4e1 Mon Sep 17 00:00:00 2001 From: Rob Cresswell Date: Thu, 10 Mar 2016 17:35:33 +0000 Subject: [PATCH] Fix tests failing due to missing SECRET_KEY Change-Id: I9868016a2fcdb811938fccf9e6813153a8fd5d65 Closes-Bug: 1555735 --- .gitignore | 1 + horizon_cisco_ui/test/settings.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index d252537..733e804 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .venv .tox *.secret_key_store +*.secret_key_store.lock *.test_secret_key_store.lock node_modules npm-debug.log diff --git a/horizon_cisco_ui/test/settings.py b/horizon_cisco_ui/test/settings.py index e008ad6..6e6fa2c 100644 --- a/horizon_cisco_ui/test/settings.py +++ b/horizon_cisco_ui/test/settings.py @@ -16,4 +16,13 @@ # License for the specific language governing permissions and limitations # under the License. +# Small hack to ensure that the tests don't fail, due to the developer +# dashboard hitting settings +from horizon.utils import secret_key +import os +LOCAL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'local') +SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, + '.secret_key_store')) + +# Fall back to default o_d settings so we don't need to maintain our own from openstack_dashboard.test.settings import * # noqa