Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
    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))
Esempio n. 4
0
    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))
Esempio n. 5
0
 def __init__(self, db_file):
     super(DataStorage, self).__init__()
     self.store = create_store('sqla', url=db_file)
Esempio n. 6
0
 def __init__(self, db_file):
     super(DataStorage, self).__init__()
     self.store = create_store('sqla', url=db_file)