def test_start_stop(self, poll): hub = Hub() hub.start() poll.assert_called_with() hub.stop() hub.poller.close.assert_called_with()