aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_audiobook_cli.py
diff options
context:
space:
mode:
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"), \