Skip to content

Commit

Permalink
updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RuthShryock committed Dec 13, 2023
1 parent 33f71da commit bef5f45
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions onadata/apps/main/tests/test_service_health_minimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

# Check that the response content contains "ok"
self.assertContains(res, "ok")

0 comments on commit bef5f45

Please sign in to comment.