aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r--mediagoblin/tests/tools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/tests/tools.py b/mediagoblin/tests/tools.py
index 5b4e3746..bf40ea8b 100644
--- a/mediagoblin/tests/tools.py
+++ b/mediagoblin/tests/tools.py
@@ -116,6 +116,9 @@ def get_test_app(dump_old_app=True):
if MGOBLIN_APP and not dump_old_app:
return MGOBLIN_APP
+ Session.rollback()
+ Session.remove()
+
# Remove and reinstall user_dev directories
if os.path.exists(TEST_USER_DEV):
shutil.rmtree(TEST_USER_DEV)
@@ -135,9 +138,6 @@ def get_test_app(dump_old_app=True):
test_app = loadapp(
'config:' + TEST_SERVER_CONFIG)
- Session.rollback()
- Session.remove()
-
# Re-setup celery
setup_celery_app(app_config, global_config)