(self)
| 109 | |
| 110 | class TestParseEntitiesPlan: |
| 111 | def test_extracts_entities_group(self): |
| 112 | parsed = { |
| 113 | "concepts": {"create": [{"name": "x", "title": "X"}], "update": [], "related": []}, |
| 114 | "entities": { |
| 115 | "create": [{"name": "anthropic", "title": "Anthropic", "type": "organization"}], |
| 116 | "update": [], |
| 117 | "related": ["nvidia"], |
| 118 | }, |
| 119 | } |
| 120 | ents = _parse_entities_plan(parsed) |
| 121 | assert ents["create"] == [ |
| 122 | {"name": "anthropic", "title": "Anthropic", "type": "organization"} |
| 123 | ] |
| 124 | assert ents["related"] == ["nvidia"] |
| 125 | |
| 126 | def test_missing_entities_key_is_empty(self): |
| 127 | ents = _parse_entities_plan({"create": [], "update": [], "related": []}) |
nothing calls this directly
no test coverage detected