Member.start starts the role and node in self.thread
(self)
| 44 | execute_fn=self.state_machine) |
| 45 | |
| 46 | def test_start(self): |
| 47 | """Member.start starts the role and node in self.thread""" |
| 48 | sh = Member(self.state_machine, network=self.network, |
| 49 | peers=['p1', 'p2'], **self.cls_args) |
| 50 | sh.start() |
| 51 | sh.thread.join() |
| 52 | sh.startup_role.start.assert_called_once_with() |
| 53 | self.failUnless(self.network.ran) |
| 54 | |
| 55 | def test_invoke(self): |
| 56 | """Member.invoke makes a new Request, starts it, and waits for its callback to be called.""" |