MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / SourceRefTests

Class SourceRefTests

tests/knowledge/test_base.py:50–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48
49
50class SourceRefTests(unittest.TestCase):
51 def test_minimal(self):
52 s = SourceRef(kind="arxiv", uri="arxiv:2604.12345")
53 self.assertEqual(s.kind, "arxiv")
54 self.assertEqual(s.uri, "arxiv:2604.12345")
55 self.assertIsNone(s.fetched_at)
56 self.assertIsNone(s.content_hash)
57
58 def test_kind_enum_enforced(self):
59 with self.assertRaises(ValidationError):
60 SourceRef(kind="ftp") # type: ignore[arg-type]
61
62 def test_extra_forbidden(self):
63 with self.assertRaises(ValidationError):
64 SourceRef(kind="manual", garbage=1) # type: ignore[call-arg]
65
66
67class ExtractionRefTests(unittest.TestCase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected