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

Class TestBaseAPICheckContent

tests/models/test_base_api.py:115–138  ·  view source on GitHub ↗

Tests for check_content method.

Source from the content-addressed store, hash-verified

113
114
115class TestBaseAPICheckContent:
116 """Tests for check_content method."""
117
118 def test_check_content_text_only(self, api):
119 """Test check_content with text string."""
120 result = api.check_content("Hello world")
121 assert result == "str"
122
123 def test_check_content_with_dict(self, api):
124 """Test check_content with dict."""
125 result = api.check_content({"type": "text", "value": "Hello"})
126 assert result == "dict"
127
128 def test_check_content_with_list_str(self, api):
129 """Test check_content with list of strings."""
130 result = api.check_content(["Hello", "World"])
131 assert result == "liststr"
132
133 def test_check_content_with_list_dict(self, api):
134 """Test check_content with list of dicts."""
135 result = api.check_content(
136 [{"type": "text", "value": "Hello"}, {"type": "text", "value": "World"}]
137 )
138 assert result == "listdict"
139
140
141class TestBaseAPIPreprocContent:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected