Adding new table settings to docker_settings
This commit is contained in:
@@ -26,7 +26,13 @@ ENABLE_QUERY = os.getenv('ENABLE_QUERY', 'True')
|
||||
LOCALISE_TIMESTAMP = bool(os.getenv('LOCALISE_TIMESTAMP',
|
||||
'True').upper() == 'TRUE')
|
||||
LOGLEVEL = os.getenv('LOGLEVEL', 'info')
|
||||
REPORTS_COUNT = int(os.getenv('REPORTS_COUNT', '10'))
|
||||
NORMAL_TABLE_COUNT = int(os.getenv('REPORTS_COUNT', '100'))
|
||||
LITTLE_TABLE_COUNT = int(os.getenv('LITTLE_TABLE_COUNT', '10'))
|
||||
|
||||
TABLE_COUNT_DEF = "10,20,50,100,500"
|
||||
TABLE_COUNT_SELECTOR = [int(x) for x in os.getenv('TABLE_COUNT_SELECTOR',
|
||||
TABLE_COUNT_DEF).split(',')]
|
||||
|
||||
OFFLINE_MODE = bool(os.getenv('OFFLINE_MODE', 'False').upper() == 'TRUE')
|
||||
ENABLE_CATALOG = bool(os.getenv('ENABLE_CATALOG', 'False').upper() == 'TRUE')
|
||||
OVERVIEW_FILTER = os.getenv('OVERVIEW_FILTER', None)
|
||||
|
||||
@@ -106,3 +106,13 @@ def test_bad_log_value(cleanUpEnv):
|
||||
reload(docker_settings)
|
||||
with pytest.raises(ValueError) as error:
|
||||
reload(app)
|
||||
|
||||
|
||||
def test_default_table_selctor(cleanUpEnv):
|
||||
assert [10, 20, 50, 100, 500] == docker_settings.TABLE_COUNT_SELECTOR
|
||||
|
||||
|
||||
def test_env_table_selector(cleanUpEnv):
|
||||
os.environ['TABLE_COUNT_SELECTOR'] = '5,15,25'
|
||||
reload(docker_settings)
|
||||
assert [5, 15, 25] == docker_settings.TABLE_COUNT_SELECTOR
|
||||
|
||||
Reference in New Issue
Block a user