示例#1
0
 def test_send_all_raises(self):
     parent = Mock()
     blueprint = self.Blueprint()
     parent.steps = [Mock()]
     parent.steps[0].foo.side_effect = KeyError()
     blueprint.send_all(parent, 'foo', propagate=False)
     with pytest.raises(KeyError):
         blueprint.send_all(parent, 'foo', propagate=True)
示例#2
0
 def test_send_all_with_None_steps(self):
     parent = Mock()
     blueprint = self.Blueprint()
     parent.steps = [None, None, None]
     blueprint.send_all(parent, 'close', 'Closing', reverse=False)