Beispiel #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
Beispiel #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
Beispiel #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))
Beispiel #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))
Beispiel #5
0
 def __init__(self, db_file):
     super(DataStorage, self).__init__()
     self.store = create_store('sqla', url=db_file)
 def __init__(self, db_file):
     super(DataStorage, self).__init__()
     self.store = create_store('sqla', url=db_file)