def test_restart(self):
    self.patch_object(self.c, '_verify_systemd_not_none', name='mock__verify_systemd_not_none')
    mock__systemd = mock.Mock()
    self.c._systemd = mock__systemd
    self.c.restart()
    self.mock__verify_systemd_not_none.assert_called_once_with()
    mock__systemd.restart.assert_called_once_with()
def test_restart(self):
    self.patch_object(self.c, '_verify_systemd_not_none', name='mock__verify_systemd_not_none')
    mock__systemd = mock.Mock()
    self.c._systemd = mock__systemd
    self.c.restart()
    self.mock__verify_systemd_not_none.assert_called_once_with()
    mock__systemd.restart.assert_called_once_with()