test: add unit tests of the app (#305)

* test: add unit tests in server

* test: add unit tests of app.py in server

* test: reformat the codes

* test: add more tests to cover the exception part

* test: add more tests on the server app part

* fix: don't show the detail exception to the client

* test: try to fix the CI test

* fix: keep the TTS API call without exposure information

* Fixed the unit test errors

* Fixed the lint error
This commit is contained in:
Willem Jiang
2025-06-18 14:13:05 +08:00
committed by GitHub
parent 89f3d731c9
commit dcdd7288ed
7 changed files with 1113 additions and 16 deletions

View File

@@ -129,4 +129,4 @@ class VolcengineTTS:
except Exception as e:
logger.exception(f"Error in TTS API call: {str(e)}")
return {"success": False, "error": str(e), "audio_data": None}
return {"success": False, "error": "TTS API call error", "audio_data": None}