MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / TestBaseAPIPreProcess

Class TestBaseAPIPreProcess

tests/models/test_base_api.py:226–240  ·  view source on GitHub ↗

Tests for pre_process method.

Source from the content-addressed store, hash-verified

224
225
226class TestBaseAPIPreProcess:
227 """Tests for pre_process method."""
228
229 def test_pre_process_text_message(self, api):
230 """Test preprocessing text message."""
231 result = api.pre_process("Hello world")
232 assert isinstance(result, list)
233 assert len(result) == 1
234 assert result[0]["role"] == "user"
235
236 def test_pre_process_list_dict_message(self, api):
237 """Test preprocessing list of dict message."""
238 msg = [{"type": "text", "value": "Hello"}]
239 result = api.pre_process(msg)
240 assert isinstance(result, list)
241
242
243class TestBaseAPIShutdown:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected