##// END OF EJS Templates
db: Set `rhodecode.is_test` in `make_pyramid_app` instead of `make_app`...
johbo -
r118:931f58e5 default
parent child Browse files
Show More
@@ -62,7 +62,6 b' def load_environment(global_conf, app_co'
62 """
62 """
63 config = PylonsConfig()
63 config = PylonsConfig()
64
64
65 rhodecode.is_test = str2bool(app_conf.get('is_test', 'False'))
66
65
67 # Pylons paths
66 # Pylons paths
68 root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
67 root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -168,7 +168,9 b' def make_pyramid_app(global_config, **se'
168 # If this is a test run we prepare the test environment like
168 # If this is a test run we prepare the test environment like
169 # creating a test database, test search index and test repositories.
169 # creating a test database, test search index and test repositories.
170 # This has to be done before the database connection is initialized.
170 # This has to be done before the database connection is initialized.
171 # if settings['is_test']:
171 if settings['is_test']:
172 if settings['is_test']:
173 rhodecode.is_test = True
172 utils.initialize_test_environment(settings_merged)
174 utils.initialize_test_environment(settings_merged)
173
175
174 # Initialize the database connection.
176 # Initialize the database connection.
@@ -316,6 +318,7 b' def sanitize_settings_and_apply_defaults'
316
318
317 _bool_setting(settings, 'vcs.server.enable', 'true')
319 _bool_setting(settings, 'vcs.server.enable', 'true')
318 _bool_setting(settings, 'static_files', 'true')
320 _bool_setting(settings, 'static_files', 'true')
321 _bool_setting(settings, 'is_test', 'false')
319
322
320 return settings
323 return settings
321
324
General Comments 0
You need to be logged in to leave comments. Login now