2022-10-24 21:51:15 +00:00
|
|
|
"""Integration test for SerpAPI."""
|
2022-11-30 04:07:44 +00:00
|
|
|
from langchain.serpapi 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()
|
2022-11-14 02:14:35 +00:00
|
|
|
output = chain.run("What was Obama's first name?")
|
2022-10-24 21:51:15 +00:00
|
|
|
assert output == "Barack Hussein Obama II"
|