Tests for check_content method.
| 113 | |
| 114 | |
| 115 | class 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 | |
| 141 | class TestBaseAPIPreprocContent: |
nothing calls this directly
no outgoing calls
no test coverage detected