CoolFace
Apppublic

NhanNguyen1309/audio-separation-api

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
test_errors.py23 linesDownload Raw Back to tests
1import unittest2 3from app.errors import ApiError4 5 6class ErrorTests(unittest.TestCase):7    def test_api_error_response_shape(self):8        error = ApiError(code="job_not_found", message="Job was not found.", status_code=404)9 10        self.assertEqual(11            error.to_response(),12            {13                "error": {14                    "code": "job_not_found",15                    "message": "Job was not found.",16                }17            },18        )19 20 21if __name__ == "__main__":22    unittest.main()23