def test_context_can_be_cleared_and_then_updated(self): Context.update({"username": "******"}) assert Context.current() == {"username": "******"} Context.clear() assert Context.current() == {} Context.update({"username": "******"}) assert Context.current() == {"username": "******"}
def test_context_can_be_updated_and_another_field_updated(self): Context.update({"username": "******"}) assert Context.current() == {"username": "******"} Context.update({"action": "test.action"}) assert Context.current() == { "username": "******", "action": "test.action" }
def test_context_can_be_updated_twice(self): Context.update({"username": "******"}) assert Context.current() == {"username": "******"} Context.update({"username": "******"}) assert Context.current() == {"username": "******"}