(self)
| 67 | assert sr.streaming is False |
| 68 | |
| 69 | def test_to_dict(self): |
| 70 | sr = StreamingResponse( |
| 71 | content="abc", |
| 72 | tool_calls=[], |
| 73 | chunks_received=3, |
| 74 | elapsed_time=0.5, |
| 75 | interrupted=False, |
| 76 | reasoning_content=None, |
| 77 | ) |
| 78 | d = sr.to_dict() |
| 79 | assert d[StreamingResponseField.RESPONSE] == "abc" |
| 80 | assert d[StreamingResponseField.TOOL_CALLS] == [] |
| 81 | assert d[StreamingResponseField.CHUNKS_RECEIVED] == 3 |
| 82 | assert d[StreamingResponseField.ELAPSED_TIME] == 0.5 |
| 83 | assert d[StreamingResponseField.STREAMING] is True |
| 84 | assert d[StreamingResponseField.INTERRUPTED] is False |
| 85 | assert d[StreamingResponseField.REASONING_CONTENT] is None |
| 86 | |
| 87 | def test_to_dict_with_tool_calls(self): |
| 88 | tc = { |
nothing calls this directly
no test coverage detected