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

Class TestBaseAPIPreprocContent

tests/models/test_base_api.py:141–164  ·  view source on GitHub ↗

Tests for preproc_content method.

Source from the content-addressed store, hash-verified

139
140
141class TestBaseAPIPreprocContent:
142 """Tests for preproc_content method."""
143
144 def test_preproc_content_simple_text(self, api):
145 """Test preprocessing simple text."""
146 result = api.preproc_content("Hello world")
147 assert isinstance(result, list)
148 assert len(result) == 1
149 assert result[0]["type"] == "text"
150 assert result[0]["value"] == "Hello world"
151
152 def test_preproc_content_dict_input(self, api):
153 """Test preprocessing dict input."""
154 inputs = {"type": "text", "value": "Hello"}
155 result = api.preproc_content(inputs)
156 assert isinstance(result, list)
157 assert len(result) == 1
158
159 def test_preproc_content_list_str_input(self, api):
160 """Test preprocessing list of strings."""
161 inputs = ["Hello", "World"]
162 result = api.preproc_content(inputs)
163 assert isinstance(result, list)
164 assert len(result) == 2
165
166
167class TestBaseAPIPrepareInputs:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected