From 4a698535bc97b37c8eb42ffea2cc3e7bd48565e6 Mon Sep 17 00:00:00 2001 From: Emily O'Leary Date: Tue, 25 Jun 2013 20:57:50 -0400 Subject: Improved test runtime from 352 seconds to 59 seconds by implementing an in-memory sqlite DB and including an option to run migrations on this newly created database by adding a config option called run_migrations to the config_spec and passing it along in app.py to the setup_database function. --- mediagoblin/config_spec.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mediagoblin/config_spec.ini') diff --git a/mediagoblin/config_spec.ini b/mediagoblin/config_spec.ini index 4547ea54..6b94901b 100644 --- a/mediagoblin/config_spec.ini +++ b/mediagoblin/config_spec.ini @@ -10,7 +10,8 @@ media_types = string_list(default=list("mediagoblin.media_types.image")) # database stuff sql_engine = string(default="sqlite:///%(here)s/mediagoblin.db") - +# Flag used during testing to determine if migrations should be run before the ORM is loaded +run_migrations = boolean(default=False) # Where temporary files used in processing and etc are kept workbench_path = string(default="%(here)s/user_dev/media/workbench") -- cgit v1.2.3