diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-06-18 20:02:59 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-06-18 20:02:59 -0500 |
commit | 908d045939dcbbba9404fdec8f3c1c584189bd76 (patch) | |
tree | 3c08828a354ff71be0494ce98185beea97803b2e | |
parent | becb77ee8cf4cc92d87d656117d6bac96544f168 (diff) | |
download | mediagoblin-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__.py | 7 |
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" |