def test_pop_context(self): ctx.push_context({'hello': 'world'}) ctx.pop_context() assert ctx.current_context().get('hello', None) is None
def test_current_user_id(self): ctx.push_context({'user_id': '42'}) assert ctx.current_user_id()
def test_push_context(self): ctx.push_context({'hello': 'world'}) assert ctx.current_context()['hello'] == 'world'