def test_restart_homeassistant_wrong_conf(self, mock_check, mock_restart): """Test stop service.""" comps.restart(self.hass) self.hass.block_till_done() assert mock_check.called assert not mock_restart.called