All mediagoblin tests now pass with py.test (switched setUp to setup)
authorChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 3 Apr 2013 19:05:42 +0000 (14:05 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 3 Apr 2013 19:05:42 +0000 (14:05 -0500)
mediagoblin/tests/test_api.py
mediagoblin/tests/test_edit.py
mediagoblin/tests/test_globals.py
mediagoblin/tests/test_http_callback.py
mediagoblin/tests/test_modelmethods.py
mediagoblin/tests/test_oauth.py
mediagoblin/tests/test_submission.py
mediagoblin/tests/test_workbench.py

index 82b1c1b4a6e06ca716bfdb97a36c66bde884d24f..294cc4ef5a682aaa393ec0b90a8969590813b6b0 100644 (file)
@@ -43,7 +43,7 @@ BIG_BLUE = resource('bigblue.png')
 
 
 class TestAPI(object):
-    def setUp(self):
+    def setup(self):
         self.app = get_app(dump_old_app=False)
         self.db = mg_globals.database
 
index 7db6eaea97f6c533e1e4a17027c1f2cdfcac0c62..a1657cef3bf5e019b1cb7a92f049d25818469721 100644 (file)
@@ -23,7 +23,7 @@ from mediagoblin.tools import template
 from mediagoblin.auth.lib import bcrypt_check_password
 
 class TestUserEdit(object):
-    def setUp(self):
+    def setup(self):
         self.app = get_app(dump_old_app=False)
         # set up new user
         self.user_password = u'toast'
index 303f89e2bd062707817fa581f0de9e3890ab0dfd..d37221405839fe44526128e2a1d94ee556122ea6 100644 (file)
@@ -20,10 +20,10 @@ from mediagoblin import mg_globals
 
 
 class TestGlobals(object):
-    def setUp(self):
+    def setup(self):
         self.old_database = mg_globals.database
 
-    def tearDown(self):
+    def teardown(self):
         mg_globals.database = self.old_database
 
     def test_setup_globals(self):
index 8bee7045cd69df0844bf39a0711d296cb28d0d04..f724922916391e66b55a1d1bf331e427f4974e88 100644 (file)
@@ -26,7 +26,7 @@ from mediagoblin.tests import test_oauth as oauth
 
 
 class TestHTTPCallback(object):
-    def setUp(self):
+    def setup(self):
         self.app = get_app(dump_old_app=False)
         self.db = mg_globals.database
 
@@ -54,7 +54,7 @@ class TestHTTPCallback(object):
         ''' Test processing HTTP callback '''
 
         self.oauth = oauth.TestOAuth()
-        self.oauth.setUp()
+        self.oauth.setup()
 
         redirect, client_id = self.oauth.test_4_authorize_confidential_client()
 
index 7719bd971909592ad5bf0a560090f418172e4c18..18f90bdcf0f8b08bb0f4de41a99a04ecd5b24715 100644 (file)
@@ -35,7 +35,7 @@ UUID_MOCK = mock.Mock(return_value=FakeUUID())
 
 
 class TestMediaEntrySlugs(object):
-    def setUp(self):
+    def setup(self):
         self.test_app = get_app(dump_old_app=True)
         self.chris_user = fixture_add_user(u'chris')
         self.emily_user = fixture_add_user(u'emily')
index 94ba5dab7d42156dacf269d9ea65244536355607..518d1bb170abc2981b003a05406576cd437f3072 100644 (file)
@@ -28,7 +28,7 @@ _log = logging.getLogger(__name__)
 
 
 class TestOAuth(object):
-    def setUp(self):
+    def setup(self):
         self.app = get_app()
         self.db = mg_globals.database
 
index fc3d8c835b3739477b7301dc3b660783cf16b5c4..b61227bc9debe0ef0b7e90d802c0f1bfebe9fd95 100644 (file)
@@ -51,7 +51,7 @@ REQUEST_CONTEXT = ['mediagoblin/user_pages/user.html', 'request']
 
 
 class TestSubmission:
-    def setUp(self):
+    def setup(self):
         self.test_app = get_app(dump_old_app=False)
 
         # TODO: Possibly abstract into a decorator like:
index 636c86896e8dab53590d60d43660e3599fe43830..3b2fc2c648ba7004ad463b243b9a8c0c52acbd2f 100644 (file)
@@ -25,7 +25,7 @@ from mediagoblin.tests.test_storage import get_tmp_filestorage
 
 
 class TestWorkbench(object):
-    def setUp(self):
+    def setup(self):
         self.workbench_manager = workbench.WorkbenchManager(
             os.path.join(tempfile.gettempdir(), u'mgoblin_workbench_testing'))