async def test_show_set_form(hass: HomeAssistant) -> None: """Test that the setup form is served.""" flow = config_flow.ConfigFlow() flow.hass = hass result = await flow.async_step_user(user_input=None) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "user"
async def test_configflow_class(): """Test configFlow class.""" configflow = config_flow.ConfigFlow() assert configflow with patch( "homeassistant.components.wallbox.config_flow.validate_input", side_effect=TypeError, ), raises(Exception): assert await configflow.async_step_user(True) with patch( "homeassistant.components.wallbox.config_flow.validate_input", side_effect=CannotConnect, ), raises(Exception): assert await configflow.async_step_user(True) with patch( "homeassistant.components.wallbox.config_flow.validate_input", ), raises(Exception): assert await configflow.async_step_user(True)