@pytest.fixture
def mock_setup_entry():
    'Mock async_setup_entry.'
    with patch('homeassistant.components.upnp.async_setup_entry', return_value=AsyncMock(True)) as mock_setup:
        (yield mock_setup)
Mock async_setup_entry.
@pytest.fixture
def mock_setup_entry():
    
    with patch('homeassistant.components.upnp.async_setup_entry', return_value=AsyncMock(True)) as mock_setup:
        (yield mock_setup)