These tests need to have a MediaGoblin app setup so they can connect to the db!
authorChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 3 Apr 2013 19:32:35 +0000 (14:32 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 3 Apr 2013 19:32:35 +0000 (14:32 -0500)
Thanks to py.test --boxed for helping discover that ;)

mediagoblin/tests/test_misc.py
mediagoblin/tests/test_modelmethods.py

index 776affc65afaea8d227e52e58402c58cd5e2a866..b20262cf422fd79554a0db6f81e181df4148c9e3 100644 (file)
@@ -29,6 +29,7 @@ def test_404_for_non_existent():
 
 
 def test_user_deletes_other_comments():
+    get_app()   # gotta init the db and etc
     user_a = fixture_add_user(u"chris_a")
     user_b = fixture_add_user(u"chris_b")
 
@@ -81,6 +82,7 @@ def test_user_deletes_other_comments():
 
 
 def test_media_deletes_broken_attachment():
+    get_app()   # gotta init the db and etc
     user_a = fixture_add_user(u"chris_a")
 
     media = fixture_media_entry(uploader=user_a.id, save=False)
index 18f90bdcf0f8b08bb0f4de41a99a04ecd5b24715..808aa9f21967c44476c1fe2356ada094d0ed6767 100644 (file)
@@ -133,6 +133,7 @@ class TestMediaEntrySlugs(object):
 
 
 def test_media_data_init():
+    get_app()   # gotta init the db and etc
     Session.rollback()
     Session.remove()
     media = MediaEntry()