Ejemplo n.º 1
0
 def test_on_changed(self):
     change = [["path"], "value"]
     s = MagicMock()
     p = Process("proc", s)
     s.reset_mock()
     p.on_changed(change, notify=False)
     p.q.put.assert_called_once_with(BlockChanged(change=change))
Ejemplo n.º 2
0
 def test_on_changed_with_notify(self):
     change = [["path"], "value"]
     s = MagicMock()
     p = Process("proc", s)
     s.reset_mock()
     p.on_changed(change)
     p.q.put.assert_has_calls([
         call(BlockChanged(change=change)),
         call(BlockNotify(name="path"))])