1
0
forked from erp-dev/erp

feat: disabled sse module and added health check to api_v2 for caddy2

This commit is contained in:
2025-12-27 09:04:12 +08:00
parent 67698dfa71
commit 69c3daa919
5 changed files with 103 additions and 48 deletions

View File

@@ -63,6 +63,16 @@ class QuickCreateEmployeeUserAPITest(TestCase):
self.assertIn('商户不存在', str(response.data))
class HealthCheckV2APITest(TestCase):
def setUp(self):
self.client = APIClient()
def test_health_check_returns_200(self):
resp = self.client.get('/api/v2/health/')
self.assertEqual(resp.status_code, 200)
self.assertEqual(resp.data.get('status'), 'ok')
class PrintingJobByCustomerAPITest(TestCase):
def setUp(self):
self.factory = APIRequestFactory()