diff options
Diffstat (limited to 'app/tests/test_hub.py')
| -rw-r--r-- | app/tests/test_hub.py | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/app/tests/test_hub.py b/app/tests/test_hub.py index 798c27f..fd22a4e 100644 --- a/app/tests/test_hub.py +++ b/app/tests/test_hub.py @@ -344,21 +344,37 @@ class HubMenuTests(unittest.TestCase): result = hub._Hub(screen).run() self.assertIsNone(result) self.assertEqual(len(calls), 1) - title, lines, kwargs = calls[0] + title, items, kwargs = calls[0] self.assertEqual(title, "Help") self.assertIs(kwargs.get("back_value"), tui.Wizard.BACK) - text = "\n".join(lines) + # Flatten the viewer rows: (segments, indent) pairs join their + # texts; plain strings (the blank lines) pass through. + text = "\n".join( + "".join(part for part, _ in item[0]) + if isinstance(item, tuple) else item + for item in items) self.assertIn("1. Put your ebooks (epub, txt, or pdf) here:", text) - self.assertIn(str(hub.BOOKS_FOLDER), text) self.assertIn("2. Put any .wavs of voices to clone here:", text) - self.assertIn(str(hub.common.VOICES_DIR), text) - self.assertIn("Install Backend and install audio.cpp.", text) + self.assertIn("3. If no backend is installed, go to Configure " + "Backends > Install Backend and install audio.cpp.", + text) + self.assertIn("4. Select TTS models to install. If you're unsure, " + "try these qwen3-tts models:", text) self.assertIn("qwen3_tts_1_7b_base_q8_0", text) self.assertIn("qwen3_tts_1_7b_customvoice_q8_0", text) self.assertIn("5. Go to Generate Audiobooks.", text) + # The "no need to manually start/stop" sentence sits on its own + # indented line below the step-5 paragraph. + self.assertIn("stop it.\nThere is no need to manually " + "start/stop servers.", text) self.assertIn("6. Generated audiobooks (m4b, mp3, etc.) will " "output here:", text) - self.assertIn(str(hub.AUDIOBOOKS_FOLDER), text) + # The three folder paths are their own indented, white-bold + # ("input") rows; the numbered steps start at the margin. + self.assertIn(([(str(hub.BOOKS_FOLDER), "input")], 1), items) + self.assertIn(([(str(hub.common.VOICES_DIR), "input")], 1), items) + self.assertIn(([(str(hub.AUDIOBOOKS_FOLDER), "input")], 1), items) + self.assertEqual(items[0][1], 0) class SubmenuStatusTableTests(unittest.TestCase): |
