langchain/tests/integration_tests/utilities/test_serpapi.py

10 lines
292 B
Python
Raw Normal View History

2022-10-24 21:51:15 +00:00
"""Integration test for SerpAPI."""
from langchain.utilities import SerpAPIWrapper
2022-10-24 21:51:15 +00:00
def test_call() -> None:
"""Test that call gives the correct answer."""
2022-11-30 04:07:44 +00:00
chain = SerpAPIWrapper()
output = chain.run("What was Obama's first name?")
2022-10-24 21:51:15 +00:00
assert output == "Barack Hussein Obama II"