def ws_ctx(path, app=None): builder = ScopeBuilder(path) scope_data = builder.get_data()[0] scope_data.update(type='websocket', scheme='wss') token = current._init_(FakeWSContext, app, scope_data, None, None) yield current current._close_(token)
def current_ctx(app, path): builder = ScopeBuilder(path) token = current._init_(FakeRequestContext, app, builder.get_data()[0]) yield current current._close_(token)
def ctx(): builder = ScopeBuilder() token = current._init_(FakeRequestContext, None, builder.get_data()[0], None, None) yield current current._close_(token)