Commit 5534151
committed
Fix test to use real asyncio tasks instead of mocks
Changed test_exception_during_guardrail_processing to use real
asyncio.Task objects instead of Mock objects. This allows the
production code to remain simple and clean, without needing
isinstance checks to handle test-specific mocks.
The test now creates actual tasks using asyncio.create_task() which
better reflects real-world usage and naturally works with the cleanup
logic that uses asyncio.gather().1 parent d64ecfe commit 5534151
File tree
2 files changed
+16
-13
lines changed- tests
- realtime
2 files changed
+16
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 168 | + | |
171 | 169 | | |
172 | 170 | | |
173 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
256 | 255 | | |
257 | | - | |
258 | | - | |
259 | | - | |
| 256 | + | |
| 257 | + | |
260 | 258 | | |
261 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
262 | 267 | | |
263 | 268 | | |
264 | 269 | | |
| |||
268 | 273 | | |
269 | 274 | | |
270 | 275 | | |
271 | | - | |
272 | | - | |
| 276 | + | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| |||
0 commit comments