From: Christopher Allan Webber Date: Wed, 3 Apr 2013 19:05:42 +0000 (-0500) Subject: All mediagoblin tests now pass with py.test (switched setUp to setup) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=958080be1673bc654adad03abc93a2d7d05c1386;p=mediagoblin.git All mediagoblin tests now pass with py.test (switched setUp to setup) --- diff --git a/mediagoblin/tests/test_api.py b/mediagoblin/tests/test_api.py index 82b1c1b4..294cc4ef 100644 --- a/mediagoblin/tests/test_api.py +++ b/mediagoblin/tests/test_api.py @@ -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 diff --git a/mediagoblin/tests/test_edit.py b/mediagoblin/tests/test_edit.py index 7db6eaea..a1657cef 100644 --- a/mediagoblin/tests/test_edit.py +++ b/mediagoblin/tests/test_edit.py @@ -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' diff --git a/mediagoblin/tests/test_globals.py b/mediagoblin/tests/test_globals.py index 303f89e2..d3722140 100644 --- a/mediagoblin/tests/test_globals.py +++ b/mediagoblin/tests/test_globals.py @@ -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): diff --git a/mediagoblin/tests/test_http_callback.py b/mediagoblin/tests/test_http_callback.py index 8bee7045..f7249229 100644 --- a/mediagoblin/tests/test_http_callback.py +++ b/mediagoblin/tests/test_http_callback.py @@ -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() diff --git a/mediagoblin/tests/test_modelmethods.py b/mediagoblin/tests/test_modelmethods.py index 7719bd97..18f90bdc 100644 --- a/mediagoblin/tests/test_modelmethods.py +++ b/mediagoblin/tests/test_modelmethods.py @@ -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') diff --git a/mediagoblin/tests/test_oauth.py b/mediagoblin/tests/test_oauth.py index 94ba5dab..518d1bb1 100644 --- a/mediagoblin/tests/test_oauth.py +++ b/mediagoblin/tests/test_oauth.py @@ -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 diff --git a/mediagoblin/tests/test_submission.py b/mediagoblin/tests/test_submission.py index fc3d8c83..b61227bc 100644 --- a/mediagoblin/tests/test_submission.py +++ b/mediagoblin/tests/test_submission.py @@ -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: diff --git a/mediagoblin/tests/test_workbench.py b/mediagoblin/tests/test_workbench.py index 636c8689..3b2fc2c6 100644 --- a/mediagoblin/tests/test_workbench.py +++ b/mediagoblin/tests/test_workbench.py @@ -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'))