aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-06-18 20:02:59 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-06-18 20:02:59 -0500
commit908d045939dcbbba9404fdec8f3c1c584189bd76 (patch)
tree3c08828a354ff71be0494ce98185beea97803b2e
parentbecb77ee8cf4cc92d87d656117d6bac96544f168 (diff)
downloadmediagoblin-908d045939dcbbba9404fdec8f3c1c584189bd76.tar.lz
mediagoblin-908d045939dcbbba9404fdec8f3c1c584189bd76.tar.xz
mediagoblin-908d045939dcbbba9404fdec8f3c1c584189bd76.zip
Only kill the database if it's really set up.
-rw-r--r--mediagoblin/tests/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/tests/__init__.py b/mediagoblin/tests/__init__.py
index e9e2a59a..1f1e23e9 100644
--- a/mediagoblin/tests/__init__.py
+++ b/mediagoblin/tests/__init__.py
@@ -21,6 +21,7 @@ def setup_package():
pass
def teardown_package():
- print "Killing db ..."
- mg_globals.db_connection.drop_database(mg_globals.database.name)
- print "... done"
+ if mg_globals.db_connection:
+ print "Killing db ..."
+ mg_globals.db_connection.drop_database(mg_globals.database.name)
+ print "... done"