def setup_module(module): """ clean up the store, establish a registered client """ clean_store() module.store = get_store(config) environ = {'tiddlyweb.config': config, 'tiddlyweb.store': module.store} ensure_bags(config) # make an application and store that info app = create(name='testapp', owner='appowner1', app_url='http://our_test_domain:8001', callback_url='http://our_test_domain:8001/_oauth/callback') client_id = app.title client_secret = app.fields['client_secret'] store_app(environ, app) config['oauth.servers']['testserver']['client_id'] = client_id config['oauth.servers']['testserver']['client_secret'] = client_secret module.client_id = client_id initialize_app(config) module.http = Http() # we need a user who is going to use the client app user = User('cdent') user.set_password('cowpig') module.store.put(user)
def setup_module(module): clean_store() module.store = get_store(config) module.environ = {'tiddlyweb.config': config, 'tiddlyweb.store': module.store} ensure_bags(config) initialize_app(config) module.http = Http() user = User('cdent') user.set_password('cowpig') module.store.put(user)
def setup_module(module): clean_store() module.store = get_store(config) module.environ = { 'tiddlyweb.config': config, 'tiddlyweb.store': module.store } ensure_bags(config) initialize_app(config) module.http = Http() user = User('cdent') user.set_password('cowpig') module.store.put(user)