code: def test_web_search(self):
      ws = SearchApiWebSearch(
          api_key=os.environ.get("SEARCHAPI_API_KEY", None), top_k=10
      )
      results = ws.run(query="Who is CEO of Microsoft?")
      documents = results["documents"]
      links = results["links"]
      assert len(documents) == len(links) == 10
      assert all(isinstance(doc, Document) for doc in results)
      assert all(isinstance(link, str) for link in links)
      assert all(link.startswith("http") for link in links)
  
file_path: haystack/test/components/websearch/test_searchapi.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.searchapi import SearchApiError, SearchApiWebSearch
label_desc: Use image node_id 7 for calling the TestSearchApiSearchAPI obj's underlying member method code with example usage: obj.test_web_search() without return types