Test from_dict with missing fields.
(self)
| 119 | assert tc.function.name == "sqrt" |
| 120 | |
| 121 | def test_from_dict_defaults(self): |
| 122 | """Test from_dict with missing fields.""" |
| 123 | data = {} |
| 124 | tc = ToolCallData.from_dict(data) |
| 125 | assert tc.id == "" |
| 126 | assert tc.type == "function" |
| 127 | assert tc.index == 0 |
| 128 | |
| 129 | def test_merge_chunk_name(self): |
| 130 | """Test merging chunk with name.""" |