def test_init_nooptionals(self): # Specifying the optional args: oauth2.init(*self.args) self.assertEqual([oauth2.CLIENT_ID, oauth2.REDIRECT_URI, oauth2.CLIENT_SECRET, oauth2.AUTHORIZE_URL, oauth2.TOKEN_URL, oauth2.AUTHS_URL, oauth2.AUTHORITY, oauth2.DOMAIN, oauth2.LOGIN_PATH, oauth2.LOGOUT_PATH, oauth2.PROCESS_PATH], self.args)
def __init__(self): # Init oauth2 client according to config: options = ['client_id', 'process_url', 'client_secret', 'authorize_url', 'token_url', 'auth_url', 'authority', 'domain'] args = [self.config.get('trac_auth_server', key) for key in options] oauth2.init(*args)