Mercurial
comparison dictation/server_test.py @ 280:49e9e591c9bb
Add persistent dictation, prewarmed WebRTC speech input, Copilot SDK routing, animated conversation lifecycle controls, parking, and architecture coverage.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 18 Aug 2026 19:14:53 -0700 |
| parents | 78699f810817 |
| children |
comparison
equal
deleted
inserted
replaced
| 279:b3b547563ec7 | 280:49e9e591c9bb |
|---|---|
| 35 with TestClient(create_app(test_config(), FakeTranscriber())) as client: | 35 with TestClient(create_app(test_config(), FakeTranscriber())) as client: |
| 36 health = client.get("/health") | 36 health = client.get("/health") |
| 37 self.assertEqual(health.status_code, 200) | 37 self.assertEqual(health.status_code, 200) |
| 38 self.assertEqual(health.json()["status"], "ok") | 38 self.assertEqual(health.json()["status"], "ok") |
| 39 self.assertIn("Zenbu Dictation", client.get("/").text) | 39 self.assertIn("Zenbu Dictation", client.get("/").text) |
| 40 self.assertIn("RTCPeerConnection", client.get("/dictation.js").text) | 40 javascript = client.get("/dictation.js").text |
| 41 self.assertIn("RTCPeerConnection", javascript) | |
| 42 self.assertIn("zenbu.dictation.event", javascript) | |
| 43 self.assertIn('publishDictation("partial"', javascript) | |
| 44 self.assertIn('publishDictation("final"', javascript) | |
| 45 self.assertIn('setStatus("Starting microphone..."', javascript) | |
| 46 self.assertIn("ZenbuDictationToggle", javascript) | |
| 47 self.assertIn("ZenbuDictationStart", javascript) | |
| 48 self.assertIn("ZenbuDictationStop", javascript) | |
| 49 self.assertIn("ZenbuDictationCommit", javascript) | |
| 50 self.assertIn("zenbu.dictation.set-active", javascript) | |
| 51 self.assertIn("zenbu.dictation.commit", javascript) | |
| 52 self.assertIn("prepareCanvasMicrophone", javascript) | |
| 53 self.assertIn("track.enabled = false", javascript) | |
| 54 self.assertIn("if (!stream)", javascript) | |
| 41 | 55 |
| 42 def test_rejects_non_offer_sdp(self): | 56 def test_rejects_non_offer_sdp(self): |
| 43 with TestClient(create_app(test_config(), FakeTranscriber())) as client: | 57 with TestClient(create_app(test_config(), FakeTranscriber())) as client: |
| 44 response = client.post( | 58 response = client.post( |
| 45 "/api/webrtc/offer", | 59 "/api/webrtc/offer", |