django-fobi/examples/simple/settings/test.py

60 lines
1.3 KiB
Python
Raw Normal View History

2022-06-23 20:42:02 +00:00
"""
Used in `tox` on GitHub CI.
"""
2022-06-23 20:06:45 +00:00
from chromedriver_py import binary_path
from .base import *
2016-10-31 01:14:28 +00:00
TESTING = True
2016-10-31 01:14:28 +00:00
INSTALLED_APPS = list(INSTALLED_APPS)
2016-10-31 01:14:28 +00:00
LOGGING = {}
2016-11-10 01:35:53 +00:00
DEBUG_TOOLBAR = False
2017-12-17 22:12:42 +00:00
DATABASES = {
'default': {
2022-06-17 22:58:21 +00:00
'ENGINE': 'django.db.backends.postgresql',
2018-08-12 00:32:38 +00:00
'NAME': 'fobi',
'USER': 'postgres',
'PASSWORD': 'test',
2017-12-17 22:12:42 +00:00
# Empty for localhost through domain sockets or '127.0.0.1' for
# localhost through TCP.
2022-06-23 20:28:38 +00:00
'HOST': 'localhost',
2019-05-21 19:59:45 +00:00
'TEST': {
2022-06-17 22:58:21 +00:00
'HOST': 'localhost',
2019-05-21 19:59:45 +00:00
'NAME': 'fobi_tests',
'USER': 'postgres',
2022-06-17 22:58:21 +00:00
'PASSWORD': 'test',
2019-05-21 19:59:45 +00:00
}
2017-12-17 22:12:42 +00:00
}
}
2017-12-27 14:11:05 +00:00
# FeinCMS addons
INSTALLED_APPS += [
'feincms', # FeinCMS
'fobi.contrib.apps.feincms_integration', # Fobi FeinCMS app
'page', # Example
]
2017-12-27 19:44:17 +00:00
MIGRATION_MODULES = {
'fobi': 'fobi.migrations',
'db_store': 'fobi.contrib.plugins.form_handlers.db_store.migrations',
'page': 'page.migrations',
}
2018-08-12 00:42:42 +00:00
2022-06-23 20:06:45 +00:00
CHROME_DRIVER_EXECUTABLE_PATH = binary_path # '/usr/bin/chromedriver'
CHROME_DRIVER_OPTIONS = webdriver.ChromeOptions()
CHROME_DRIVER_OPTIONS.add_argument('-headless')
CHROME_DRIVER_OPTIONS.add_argument('-no-sandbox')
CHROME_DRIVER_OPTIONS.set_capability('chrome.binary', "/usr/bin/google-chrome")
2018-08-12 00:42:42 +00:00
try:
from .local_settings import TEST_DATABASES as DATABASES
2018-08-12 00:42:42 +00:00
except:
pass