mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 14:47:22 -07:00
test(llm): cover wordlist-mode abort when no wordlist picked
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
a4da571ab4
commit
bcea02b2e7
@@ -386,3 +386,11 @@ class TestOllamaAttack:
|
||||
with patch("builtins.input", side_effect=["9"]):
|
||||
ollama_attack(ctx)
|
||||
ctx.hcatOllama.assert_not_called()
|
||||
|
||||
def test_wordlist_mode_aborts_when_no_wordlist_picked(self) -> None:
|
||||
ctx = _make_ctx()
|
||||
# mode "2", then an invalid picker selection -> picker returns None
|
||||
ctx.list_wordlist_files.return_value = []
|
||||
with patch("builtins.input", side_effect=["2", "nonsense"]):
|
||||
ollama_attack(ctx)
|
||||
ctx.hcatOllama.assert_not_called()
|
||||
|
||||
Reference in New Issue
Block a user