from unittest.mock import Mock


def _mock_soco_new(ip_address):
    """Helper function that replaces the SoCo constructor. Returns Mock objects for
    Sonos devices at two specific IP addresses."""

    if ip_address in ["192.168.0.1", "192.168.0.2"]:
        return Mock(
            visible_zones=["192.168.0.1"], all_zones=["192.168.0.1", "192.168.0.2"]
        )
    else:
        raise ValueError