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