From f60c73463ac12218a624a530cd1be721fc5e0fc5 Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Tue, 13 May 2014 15:26:13 -0400 Subject: [PATCH] Fix the tests to work with the database proxy. --- initdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/initdb.py b/initdb.py index 065e0f6a1..04212d43e 100644 --- a/initdb.py +++ b/initdb.py @@ -148,7 +148,7 @@ def setup_database_for_testing(testcase): # Sanity check to make sure we're not killing our prod db db = model.db - if not isinstance(model.db, SqliteDatabase): + if not isinstance(model.db.obj, SqliteDatabase): raise RuntimeError('Attempted to wipe production database!') global db_initialized_for_testing @@ -242,7 +242,7 @@ def wipe_database(): # Sanity check to make sure we're not killing our prod db db = model.db - if not isinstance(model.db, SqliteDatabase): + if not isinstance(model.db.obj, SqliteDatabase): raise RuntimeError('Attempted to wipe production database!') drop_model_tables(all_models, fail_silently=True)