code: def test_init_fail_wo_api_key(self, monkeypatch):
      monkeypatch.delenv("SERPERDEV_API_KEY", raising=False)
      with pytest.raises(
          ValueError, match="SerperDevWebSearch expects an API key"
      ):
          SerperDevWebSearch()
  
file_path: haystack/test/components/websearch/test_serperdev.py
imports: import os
  from unittest.mock import Mock, patch
  import pytest
  from requests import Timeout, RequestException, HTTPError
  from haystack import Document
  from haystack.components.websearch.serper_dev import SerperDevWebSearch, SerperDevError
label_desc: Use image node_id 1 for calling the TestSerperDevSearchAPI obj's underlying member method code with example usage: obj.test_init_fail_wo_api_key(monkeypatch) without return types