def get_token_store(): """Retrieve the key store for the service exchange tokens.""" registry = get_current_registry() # FIXME The keystore is hardcoded against our existing sqla url. # This should be a settings based connection utility lookup. sqla_url = registry.settings['sqlalchemy.url'] token_storage = anykeystore.create_store('sqla', url=sqla_url) return token_storage
def test_create_store(self): from anykeystore import create_store store = create_store('memory') from anykeystore.backends.memory import MemoryStore self.assertTrue(isinstance(store, MemoryStore))
def __init__(self, db_file): super(DataStorage, self).__init__() self.store = create_store('sqla', url=db_file)