langchain/libs/community/tests/integration_tests/utilities/test_steam_api.py
Eugene Yurtsev 25fbe356b4
community[patch]: upgrade to recent version of mypy (#21616)
This PR upgrades community to a recent version of mypy. It inserts type:
ignore on all existing failures.
2024-05-13 14:55:07 -04:00

23 lines
743 B
Python

import ast
from langchain_community.utilities.steam import SteamWebAPIWrapper
def test_get_game_details() -> None:
"""Test for getting game details on Steam"""
steam = SteamWebAPIWrapper() # type: ignore[call-arg]
output = steam.run("get_game_details", "Terraria")
assert "id" in output
assert "link" in output
assert "detailed description" in output
assert "supported languages" in output
assert "price" in output
def test_get_recommended_games() -> None:
"""Test for getting recommended games on Steam"""
steam = SteamWebAPIWrapper() # type: ignore[call-arg]
output = steam.run("get_recommended_games", "76561198362745711")
output = ast.literal_eval(output)
assert len(output) == 5