Skip to content

Commit

Permalink
Add simple hello world test for api
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowcap committed Feb 11, 2025
1 parent 919ceba commit bfabf23
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 bfabf23

Please sign in to comment.