From c227957d97d07490829928d993ab963c68758fb0 Mon Sep 17 00:00:00 2001 From: Yandrik Date: Thu, 25 Apr 2024 15:44:37 +0200 Subject: [PATCH] test: fix api key problem in test --- test_audiogen_validate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_audiogen_validate.py b/test_audiogen_validate.py index 072dd2d..8ca8f83 100644 --- a/test_audiogen_validate.py +++ b/test_audiogen_validate.py @@ -14,7 +14,7 @@ class TestAudioGeneratorValidate(TestCase): {"type": "section_end"}, {"type": "insert_section", "section_id": 1}, ] - self.audio_generator = AudioGenerator(self.valid_parsed_data, "test_output.mp3", api_key="") + self.audio_generator = AudioGenerator(self.valid_parsed_data, "test_output.mp3", api_key="abc") def test_validate_voices_valid(self): self.audio_generator.validate_voices() @@ -25,7 +25,7 @@ class TestAudioGeneratorValidate(TestCase): {"type": "voice", "voice": "invalid_voice"}, {"type": "text", "text": "Hello, world!"}, ] - invalid_audio_generator = AudioGenerator(invalid_parsed_data, "test_output.mp3", api_key="") + invalid_audio_generator = AudioGenerator(invalid_parsed_data, "test_output.mp3", api_key="abc") with self.assertRaises(ValueError) as cm: invalid_audio_generator.validate_voices() self.assertEqual(str(cm.exception), "Invalid voice(s) found: invalid_voice") @@ -40,7 +40,7 @@ class TestAudioGeneratorValidate(TestCase): {"type": "text", "text": "Hello, world!"}, {"type": "insert_section", "section_id": 1}, ] - invalid_audio_generator = AudioGenerator(invalid_parsed_data, "test_output.mp3", api_key="") + invalid_audio_generator = AudioGenerator(invalid_parsed_data, "test_output.mp3", api_key="abc") with self.assertRaises(ValueError) as cm: invalid_audio_generator.validate_sections() self.assertIn("Section 1 is used before being defined.", str(cm.exception))