aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/__init__.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-06-10 21:59:04 +0200
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-06-10 21:59:04 +0200
commit12c559447a75fa4b43872ccda544762a331a1bed (patch)
treee95ad62c91308df289180e3d79af167c527ce353 /mediagoblin/tests/__init__.py
parentd07713d0b0696528927e720e957ac4d049e3f46f (diff)
downloadmediagoblin-12c559447a75fa4b43872ccda544762a331a1bed.tar.lz
mediagoblin-12c559447a75fa4b43872ccda544762a331a1bed.tar.xz
mediagoblin-12c559447a75fa4b43872ccda544762a331a1bed.zip
Tests: Kill the whole testing database after all tests
nose allows setup and teardown functions at the package level. So use this to drop the complete database after all tests have finished.
Diffstat (limited to 'mediagoblin/tests/__init__.py')
-rw-r--r--mediagoblin/tests/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/mediagoblin/tests/__init__.py b/mediagoblin/tests/__init__.py
index c129cbf8..46c7fd69 100644
--- a/mediagoblin/tests/__init__.py
+++ b/mediagoblin/tests/__init__.py
@@ -13,3 +13,14 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from .. import globals
+
+
+def setup_package():
+ pass
+
+def teardown_package():
+ print "Killing db ..."
+ globals.db_connection.drop_database(globals.database.name)
+ print "... done"