summaryrefslogtreecommitdiff
path: root/test_send.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_send.py')
-rw-r--r--test_send.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test_send.py b/test_send.py
new file mode 100644
index 0000000..fa27e99
--- /dev/null
+++ b/test_send.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+"""Quick test: send a Telegram message via broker"""
+import os
+import httpx
+
+API_SECRET = os.environ["API_SECRET"]
+resp = httpx.post(
+ "http://127.0.0.1:8000/telegram/send",
+ headers={"Authorization": f"Bearer {API_SECRET}"},
+ json={"message": "Claude Bridge 已上线! 这是测试消息。"},
+)
+print(resp.status_code, resp.text)