Skip to content

Commit 4060504

Browse files
committed
add query test
1 parent af7d755 commit 4060504

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/test_session.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,20 @@ def test_make_request_invalid_type(session: lpdb.LpdbSession):
4141
session.make_request("match2", "leagueoflegends")
4242

4343

44-
def test_make_request(session: lpdb.LpdbSession):
44+
def test_make_request_with_specific_datapoints(session: lpdb.LpdbSession):
4545
responses = session.make_request(
4646
"match",
4747
"leagueoflegends",
48-
conditions="[[parent::World_Championship/2025]]",
48+
conditions="[[parent::World_Championship/2024]]",
49+
query=["parent", "date"],
4950
streamurls="true",
5051
)
5152

5253
for response in responses:
53-
assert response["parent"] == "World_Championship/2025"
54+
assert response["parent"] == "World_Championship/2024"
55+
assert isinstance(response["date"], str)
56+
with pytest.raises(KeyError):
57+
print(response["liquipediatier"])
5458

5559

5660
def test_make_request_with_order(session: lpdb.LpdbSession):

0 commit comments

Comments
 (0)