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