(self)
| 82 | |
| 83 | class TestParseConceptsPlan: |
| 84 | def test_dict_format(self): |
| 85 | text = json.dumps( |
| 86 | { |
| 87 | "create": [{"name": "foo", "title": "Foo"}], |
| 88 | "update": [{"name": "bar", "title": "Bar"}], |
| 89 | "related": ["baz"], |
| 90 | } |
| 91 | ) |
| 92 | parsed = _parse_json(text) |
| 93 | assert isinstance(parsed, dict) |
| 94 | assert len(parsed["create"]) == 1 |
| 95 | assert len(parsed["update"]) == 1 |
| 96 | assert parsed["related"] == ["baz"] |
| 97 | |
| 98 | def test_fallback_list_format(self): |
| 99 | text = json.dumps([{"name": "foo", "title": "Foo"}]) |
nothing calls this directly
no test coverage detected