@pytest.fixture(autouse=True)
def mock_upnp_device():
    'Mock homeassistant.components.upnp.Device.'

    async def mock_async_create_upnp_device(hass: HomeAssistant, location: str) -> UpnpDevice:
        'Create UPnP device.'
        return MockUpnpDevice(location)
    with patch('homeassistant.components.upnp.device.async_create_upnp_device', side_effect=mock_async_create_upnp_device) as mock_async_create_upnp_device, patch('homeassistant.components.upnp.device.IgdDevice', new=MockIgdDevice) as mock_igd_device:
        (yield (mock_async_create_upnp_device, mock_igd_device))
Mock homeassistant.components.upnp.Device.
@pytest.fixture(autouse=True)
def mock_upnp_device():
    

    async def mock_async_create_upnp_device(hass: HomeAssistant, location: str) -> UpnpDevice:
        'Create UPnP device.'
        return MockUpnpDevice(location)
    with patch('homeassistant.components.upnp.device.async_create_upnp_device', side_effect=mock_async_create_upnp_device) as mock_async_create_upnp_device, patch('homeassistant.components.upnp.device.IgdDevice', new=MockIgdDevice) as mock_igd_device:
        (yield (mock_async_create_upnp_device, mock_igd_device))