mirror of
https://github.com/hwchase17/langchain.git
synced 2025-11-02 09:14:45 +00:00
Cleanup integration test dir (#3308)
This commit is contained in:
19
tests/integration_tests/utilities/test_wikipedia_api.py
Normal file
19
tests/integration_tests/utilities/test_wikipedia_api.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Integration test for Wikipedia API Wrapper."""
|
||||
from langchain.utilities import WikipediaAPIWrapper
|
||||
|
||||
|
||||
def test_call() -> None:
|
||||
"""Test that WikipediaAPIWrapper returns correct answer"""
|
||||
|
||||
wikipedia = WikipediaAPIWrapper()
|
||||
output = wikipedia.run("HUNTER X HUNTER")
|
||||
assert "Yoshihiro Togashi" in output
|
||||
|
||||
|
||||
def test_no_result_call() -> None:
|
||||
"""Test that call gives no result."""
|
||||
wikipedia = WikipediaAPIWrapper()
|
||||
output = wikipedia.run(
|
||||
"NORESULTCALL_NORESULTCALL_NORESULTCALL_NORESULTCALL_NORESULTCALL_NORESULTCALL"
|
||||
)
|
||||
assert "No good Wikipedia Search Result was found" == output
|
||||
Reference in New Issue
Block a user