Fix failing unit tests

Purpose of this commit is to overwrite Django settings of Horizon.
Horizon team decided to set debug flag to True, which causes problem in our tests.

Error occurs after this Horizon commit:
b0e9c3135c

Change-Id: I4d677bb4522e315ab2e4386193deb52a82d7645f
Story: 2005336
Task: 30274
This commit is contained in:
Michał Piotrowski 2019-04-10 14:11:39 +02:00
parent a6bc9ba3ce
commit 9bb176fe2a
1 changed files with 24 additions and 0 deletions

View File

@ -40,6 +40,30 @@ INSTALLED_APPS = (
'openstack_dashboard.dashboards.settings',
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(ROOT_PATH, 'tests', 'templates')],
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.request',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.contrib.messages.context_processors.messages',
'horizon.context_processors.horizon',
],
'debug': False,
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
'horizon.loaders.TemplateLoader'
],
},
},
]
AUTHENTICATION_BACKENDS = ('openstack_auth.backend.KeystoneBackend',)
SITE_BRANDING = 'OpenStack'