class TestAPI(object):
- def setUp(self):
+ def setup(self):
self.app = get_app(dump_old_app=False)
self.db = mg_globals.database
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'
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):
class TestHTTPCallback(object):
- def setUp(self):
+ def setup(self):
self.app = get_app(dump_old_app=False)
self.db = mg_globals.database
''' Test processing HTTP callback '''
self.oauth = oauth.TestOAuth()
- self.oauth.setUp()
+ self.oauth.setup()
redirect, client_id = self.oauth.test_4_authorize_confidential_client()
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')
class TestOAuth(object):
- def setUp(self):
+ def setup(self):
self.app = get_app()
self.db = mg_globals.database
class TestSubmission:
- def setUp(self):
+ def setup(self):
self.test_app = get_app(dump_old_app=False)
# TODO: Possibly abstract into a decorator like:
class TestWorkbench(object):
- def setUp(self):
+ def setup(self):
self.workbench_manager = workbench.WorkbenchManager(
os.path.join(tempfile.gettempdir(), u'mgoblin_workbench_testing'))