Skip to content

Commit f383fbe

Browse files
committed
fix: mock _find_kb_dir in test_add_missing_init to isolate from real KB dirs
1 parent 151b90e commit f383fbe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_add_command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def _setup_kb(self, tmp_path):
5858

5959
def test_add_missing_init(self, tmp_path):
6060
runner = CliRunner()
61-
with runner.isolated_filesystem(temp_dir=tmp_path):
61+
with runner.isolated_filesystem(temp_dir=tmp_path), \
62+
patch("openkb.cli._find_kb_dir", return_value=None):
6263
result = runner.invoke(cli, ["add", "somefile.pdf"])
6364
assert "No knowledge base found" in result.output
6465

0 commit comments

Comments
 (0)