aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_audiobook_cli.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-09-01 14:32:05 -0400
committerhistoria <historiavg@proton.me>2026-09-01 14:32:05 -0400
commit6cfcd564c0684c52618235e6366f4a81c02b9a5b (patch)
tree55321760a8103bc6b5d79489fac4135a60e6e3ba /app/tests/test_audiobook_cli.py
parentdc6e7cd43029da62dabe2513fb5aa8a34df1bd6d (diff)
downloadtts-audiobook-generator-6cfcd564c0684c52618235e6366f4a81c02b9a5b.tar.gz
slop refactor/dedup
Diffstat (limited to 'app/tests/test_audiobook_cli.py')
-rw-r--r--app/tests/test_audiobook_cli.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/tests/test_audiobook_cli.py b/app/tests/test_audiobook_cli.py
index f1eb8e8..8076c8e 100644
--- a/app/tests/test_audiobook_cli.py
+++ b/app/tests/test_audiobook_cli.py
@@ -390,12 +390,16 @@ class AllModelsConvertTests(unittest.TestCase):
ctor_kwargs.append(ckwargs)
inst = MagicMock()
made.append(inst)
+ result = True
if make_run is not None:
inst.run.side_effect = make_run(ckwargs)
else:
result = states[len(made) - 1] \
if len(made) <= len(states) else True
inst.run.return_value = result
+ # Per-book outcomes the All-run loop counts on the CLI path
+ # (see audiobook._convert_each_model).
+ inst.results = {"book.txt": bool(result)}
return inst
fake_class = MagicMock(side_effect=make_instance)
@@ -550,6 +554,7 @@ class AllModelsConvertTests(unittest.TestCase):
def make_instance(*args, **ckwargs):
inst = MagicMock()
inst.run.return_value = True
+ inst.results = {"book.txt": True}
return inst
fake_class.side_effect = make_instance
with patch.object(audiobook, "setup_logging"), \