Skip to content

Commit

Permalink
test: Add raw data fetch and parse test
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed May 15, 2024
1 parent 898ac78 commit ef6fb9c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_gi.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@ async def test_owner_and_builds() -> None:
showcase = await api.fetch_showcase("618285856")
assert showcase.owner is not None
await api.fetch_builds(showcase.owner)


@pytest.mark.asyncio
async def test_raw_and_parse() -> None:
async with GenshinClient() as api:
raw = await api.fetch_showcase("901211014", raw=True)
api.parse_showcase(raw)
7 changes: 7 additions & 0 deletions tests/test_hsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ async def test_owner_and_builds() -> None:
showcase = await api.fetch_showcase("809162009")
assert showcase.owner is not None
await api.fetch_builds(showcase.owner)


@pytest.mark.asyncio
async def test_raw_and_parse() -> None:
async with HSRClient() as api:
raw = await api.fetch_showcase("809162009", raw=True)
api.parse_showcase(raw)

0 comments on commit ef6fb9c

Please sign in to comment.