示例#1
0
    def context_manager(self):
        """LocalProxy refering to the app's instance of the  :class: `ContextManager`.

        Interface for adding and accessing contexts and their parameters
        """
        return getattr(_app_ctx_stack.top, '_assist_context_manager',
                       ContextManager())
示例#2
0
def manager(simple_assist):

    # give dummy session_id b/c
    # these tests won't recieve requests
    # simple_assist.session_id = "test-session-id"
    m = ContextManager(assist=simple_assist)
    assert len(m._cache) == 0
    assert len(m.active) == 0
    return m