Skip to content

Commit

Permalink
Test Query
Browse files Browse the repository at this point in the history
  • Loading branch information
RickiJay-WMDE committed Jan 29, 2025
1 parent 85391be commit c2645a5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/test_query/test_wikibase_list_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
country
region
}
languages {
primary
additional
}
urls {
baseUrl
actionApi
Expand Down Expand Up @@ -81,7 +85,9 @@

@pytest.mark.asyncio
@pytest.mark.query
@pytest.mark.dependency(depends=["add-wikibase"], scope="session")
@pytest.mark.dependency(
depends=["add-wikibase", "update-wikibase-primary-language-3"], scope="session"
)
async def test_wikibase_list_query():
"""Test Wikibase List"""

Expand Down Expand Up @@ -110,6 +116,13 @@ async def test_wikibase_list_query():
assert_layered_property_value(result_datum, ["location", "country"], "Germany")
assert_layered_property_value(result_datum, ["location", "region"], "Europe")

assert_layered_property_value(result_datum, ["languages", "primary"], "Hindi")
assert_layered_property_value(
result_datum,
["languages", "additional"],
["Albanian", "Babylonian", "Cymru", "Deutsch", "French"],
)

for url_name, url in [
("baseUrl", "example.com"),
("actionApi", "example.com/w/api.php"),
Expand Down

0 comments on commit c2645a5

Please # to comment.