(self, synthetic_cve_db, rag_config)
| 111 | |
| 112 | class TestSearch: |
| 113 | def test_search_basic(self, synthetic_cve_db, rag_config): |
| 114 | rag = CVERagIndex(rag_config) |
| 115 | rag.build(synthetic_cve_db, interactive=False) |
| 116 | |
| 117 | hits = rag.search("log4j JNDI remote code execution") |
| 118 | assert len(hits) > 0 |
| 119 | assert hits[0]["cve_id"] == "CVE-2021-44228" |
| 120 | assert hits[0]["score"] > 0 |
| 121 | |
| 122 | def test_search_struts(self, synthetic_cve_db, rag_config): |
| 123 | rag = CVERagIndex(rag_config) |
nothing calls this directly
no test coverage detected