MCPcopy Create free account
hub / github.com/idank/explainshell / test_reports_issues

Method test_reports_issues

tests/test_manager.py:2468–2482  ·  view source on GitHub ↗

Insert an orphaned mapping so db-check has something to report.

(self)

Source from the content-addressed store, hash-verified

2466 self.assertIn("No issues found", result.output)
2467
2468 def test_reports_issues(self):
2469 """Insert an orphaned mapping so db-check has something to report."""
2470 self.store._conn.execute("PRAGMA foreign_keys = OFF")
2471 self.store._conn.execute(
2472 "INSERT INTO mappings(src, dst, score) VALUES (?, ?, ?)",
2473 ("ghost", "ubuntu/26.04/1/ghost.1.gz", 10),
2474 )
2475 self.store._conn.commit()
2476 self.store._conn.execute("PRAGMA foreign_keys = ON")
2477
2478 runner = CliRunner()
2479 result = runner.invoke(cli, ["--db", self.db_path, "db-check"])
2480
2481 self.assertNotEqual(result.exit_code, 0)
2482 self.assertIn("orphaned mapping", result.output)
2483
2484 def test_nonexistent_db(self):
2485 runner = CliRunner()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected