Skip to content

Commit

Permalink
test: add tests for fetch stock
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Oct 17, 2023
1 parent 5bd87f4 commit 0e2b547
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ async def test_fetch_stock():
client = stock_crawl.StockCrawl()
stock = await client.fetch_stock("2330")
assert stock is not None
stock = await client.fetch_stock("台積電")
assert stock is not None
stock = await client.fetch_stock("0")
assert stock is None
stock = await client.fetch_stock("不存在")
assert stock is None
await client.close()


Expand Down

0 comments on commit 0e2b547

Please sign in to comment.