aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/tools.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-06-21 16:04:44 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-06-21 16:04:44 -0500
commitcfd2cbf3dd0c454556524a649204c51f7a6f6a5b (patch)
tree4219942a383c4c04c8d9c6704fadb3affaa3a005 /mediagoblin/tests/tools.py
parent4fd18da0a8585e454cf68f16487ef5abc213d78a (diff)
downloadmediagoblin-cfd2cbf3dd0c454556524a649204c51f7a6f6a5b.tar.lz
mediagoblin-cfd2cbf3dd0c454556524a649204c51f7a6f6a5b.tar.xz
mediagoblin-cfd2cbf3dd0c454556524a649204c51f7a6f6a5b.zip
Make sure we *ONLY* ever kill the test database, EVER.
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r--mediagoblin/tests/tools.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/mediagoblin/tests/tools.py b/mediagoblin/tests/tools.py
index 9e36fc5c..b35d54e0 100644
--- a/mediagoblin/tests/tools.py
+++ b/mediagoblin/tests/tools.py
@@ -28,7 +28,7 @@ from mediagoblin.decorators import _make_safe
from mediagoblin.db.open import setup_connection_and_db_from_config
-MEDIAGOBLIN_TEST_DB_NAME = '__mediagoblinunittests__'
+MEDIAGOBLIN_TEST_DB_NAME = u'__mediagoblin_tests__'
TEST_SERVER_CONFIG = pkg_resources.resource_filename(
'mediagoblin.tests', 'test_paste.ini')
TEST_APP_CONFIG = pkg_resources.resource_filename(
@@ -78,6 +78,7 @@ def get_test_app(dump_old_app=True):
# @@: For now we're dropping collections, but we could also just
# collection.remove() ?
connection, db = setup_connection_and_db_from_config(app_config)
+ assert db.name == MEDIAGOBLIN_TEST_DB_NAME
collections_to_wipe = [
collection
@@ -87,10 +88,6 @@ def get_test_app(dump_old_app=True):
for collection in collections_to_wipe:
db.drop_collection(collection)
- # Don't need these anymore...
- del(connection)
- del(db)
-
# TODO: Drop and recreate indexes
# setup app and return