aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_tts.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-25 13:28:42 -0400
committerhistoria <historiavg@proton.me>2026-08-25 13:28:42 -0400
commitd4dbc1a158d1dd6babcba7333a4ed7d719b65d3e (patch)
treeccba2efaef9a265f7cbc754cf70d8071d09e9612 /app/tests/test_tts.py
parent0cc01d1da0a629e104202053feb0bb0db91d578d (diff)
downloadtts-audiobook-generator-d4dbc1a158d1dd6babcba7333a4ed7d719b65d3e.tar.gz
feat: automatically name audio.cpp model ids with long name
Diffstat (limited to 'app/tests/test_tts.py')
-rw-r--r--app/tests/test_tts.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/tests/test_tts.py b/app/tests/test_tts.py
index 77f0ee8..b43919d 100644
--- a/app/tests/test_tts.py
+++ b/app/tests/test_tts.py
@@ -477,6 +477,13 @@ class QwenTTSClientGenerateTests(unittest.TestCase):
class AudioCppTTSClientHealthTests(unittest.TestCase):
"""Connection behavior of the audio.cpp client."""
+ def setUp(self):
+ # The default AUDIOCPP_MODEL_ID is empty (auto-select); these tests
+ # exercise a configured single-model server, so pin a concrete id.
+ patcher = patch.object(config, "AUDIOCPP_MODEL_ID", "qwen")
+ patcher.start()
+ self.addCleanup(patcher.stop)
+
@staticmethod
def _json_response(payload):
response = MagicMock()
@@ -670,6 +677,11 @@ class AudioCppTTSClientHealthTests(unittest.TestCase):
class AudioCppTaskDetectionTests(unittest.TestCase):
"""Task auto-detection (tts/clon/vdes) and voice design validation."""
+ def setUp(self):
+ patcher = patch.object(config, "AUDIOCPP_MODEL_ID", "qwen")
+ patcher.start()
+ self.addCleanup(patcher.stop)
+
@staticmethod
def _json_response(payload):
response = MagicMock()
@@ -808,6 +820,11 @@ class AudioCppTaskDetectionTests(unittest.TestCase):
class AudioCppFamilyDetectionTests(unittest.TestCase):
"""Family auto-detection and per-family adaptations."""
+ def setUp(self):
+ patcher = patch.object(config, "AUDIOCPP_MODEL_ID", "qwen")
+ patcher.start()
+ self.addCleanup(patcher.stop)
+
@staticmethod
def _json_response(payload):
response = MagicMock()