def test_warn_on_masked_volume_when_masked(self):
    volumes_option = [VolumeSpec('/home/user', '/path', 'rw')]
    container_volumes = [VolumeSpec('/var/lib/docker/path', '/path', 'rw'), VolumeSpec('/var/lib/docker/path', '/other', 'rw')]
    service = 'service_name'
    with mock.patch('compose.service.log', autospec=True) as mock_log:
        warn_on_masked_volume(volumes_option, container_volumes, service)
    mock_log.warn.assert_called_once_with(mock.ANY)
def test_warn_on_masked_volume_when_masked(self):
    volumes_option = [VolumeSpec('/home/user', '/path', 'rw')]
    container_volumes = [VolumeSpec('/var/lib/docker/path', '/path', 'rw'), VolumeSpec('/var/lib/docker/path', '/other', 'rw')]
    service = 'service_name'
    with mock.patch('compose.service.log', autospec=True) as mock_log:
        warn_on_masked_volume(volumes_option, container_volumes, service)
    mock_log.warn.assert_called_once_with(mock.ANY)