From 2c9d081506aa0b8b781592c22c375f3d96e93607 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 8 May 2024 14:50:44 -0700 Subject: [PATCH] Fix bug in unit test mocking --- tests/unit_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_tests.py b/tests/unit_tests.py index 296fcb9..9a168fd 100644 --- a/tests/unit_tests.py +++ b/tests/unit_tests.py @@ -174,7 +174,7 @@ def test_validator_valid(self): def test_validator_invalid(self): tts = DummyTTS("", {}) - tts.validator.validate_lang = Mock(return_value=False) + tts.validator.validate_lang = Mock(side_effect=Exception("Validation Error")) with self.assertRaises(Exception): tts.validator.validate()