diff --git a/onadata/apps/main/tests/test_service_health_minimal.py b/onadata/apps/main/tests/test_service_health_minimal.py index bb81bc28b..f4d49eed4 100644 --- a/onadata/apps/main/tests/test_service_health_minimal.py +++ b/onadata/apps/main/tests/test_service_health_minimal.py @@ -3,17 +3,11 @@ class ServiceHealthMinimalTestCase(TestCase): - url = reverse('service-health-minimal') + url = reverse("service-health-minimal") def test_service_health_minimal(self): - res = self.client.get(self.url) - self.assertEqual(res.status_code, 200) + with self.assertNumQueries(0): + res = self.client.get(self.url) - # Check that the response content is "ok" - expected_content = 'ok' - actual_content = res.content.decode('utf-8') - self.assertEqual(actual_content, expected_content) - - # Ensure that no database queries were executed - self.assertNumQueries(0) - \ No newline at end of file + # Check that the response content contains "ok" + self.assertContains(res, "ok")