Skip to content

Commit

Permalink
Merge pull request #147 from wri/hello-world-api-test
Browse files Browse the repository at this point in the history
Add simple hello world test for api
  • Loading branch information
yellowcap authored Feb 11, 2025
2 parents 919ceba + bfabf23 commit 93dc1dd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from fastapi.testclient import TestClient

from api import app

client = TestClient(app)


def test_read_main():
response = client.post(
"/stream/dist_alert",
json=dict(query="Hi Zeno", thread_id="1", query_type="human_input"),
)
assert response.status_code == 200
assert "Hello" in response.json()["content"]

0 comments on commit 93dc1dd

Please sign in to comment.