text: """Test the Home Assistant Yellow config flow."""
  from unittest.mock import patch
  
  from homeassistant.components.homeassistant_yellow.const import DOMAIN
  from homeassistant.core import HomeAssistant
  from homeassistant.data_entry_flow import RESULT_TYPE_ABORT, RESULT_TYPE_CREATE_ENTRY
  
  from tests.common import MockConfigEntry, MockModule, mock_integration
  
  
  async def test_config_flow(hass: HomeAssistant) -> None:
      """Test the config flow."""
      mock_integration(hass, MockModule("hassio"))
  
      with patch(
          "homeassistant.components.homeassistant_yellow.async_setup_entry",
          return_value=True,
      ) as mock_setup_entry:
          result = await hass.config_entries.flow.async_init(
              DOMAIN, context={"source": "system"}
          )
  
      assert result["type"] == RESULT_TYPE_CREATE_ENTRY
      assert result["title"] == "Home Assistant Yellow"
      assert result["data"] == {}
      assert result["options"] == {}
      assert len(mock_setup_entry.mock_calls) == 1
  
      config_entry = hass.config_entries.async_entries(DOMAIN)[0]
      assert config_entry.data == {}
      assert config_entry.options == {}
      assert config_entry.title == "Home Assistant Yellow"
  
  
  async def test_config_flow_single_entry(hass: HomeAssistant) -> None:
      """Test only a single entry is allowed."""
      mock_integration(hass, MockModule("hassio"))
  
      # Setup the config entry
      config_entry = MockConfigEntry(
          data={},
          domain=DOMAIN,
          options={},
          title="Home Assistant Yellow",
      )
      config_entry.add_to_hass(hass)
  
      with patch(
          "homeassistant.components.homeassistant_yellow.async_setup_entry",
          return_value=True,
      ) as mock_setup_entry:
          result = await hass.config_entries.flow.async_init(
              DOMAIN, context={"source": "system"}
          )
  
      assert result["type"] == RESULT_TYPE_ABORT
      assert result["reason"] == "single_instance_allowed"
      mock_setup_entry.assert_not_called()
  