admin-panel-backend/apps/core/tests.py

10 lines
340 B
Python

from rest_framework import status
from rest_framework.test import APITestCase
class HealthCheckTests(APITestCase):
def test_health_check_returns_ok(self):
response = self.client.get("/api/health/")
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.json(), {"status": "ok"})