def test_terminate(self, kill): p = Process(Mock()) p.pid = 1234 p.terminate() kill.assert_called_once_with(p.pid, 9)