Skip to content

Commit

Permalink
changes path to health page from root to requested path
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbrockmeier-ams committed Apr 25, 2024
1 parent bb0cb67 commit 8ca2057
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
from django.urls import include, path

urlpatterns = [
path("iiif/status/health", include("health.urls")),
path("iiif/", include("iiif.urls")),
path("", include("health.urls")),
]
4 changes: 2 additions & 2 deletions tests/test_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ def setUp(self):
self.http_client = Client()

def test_health_view(self):
response = self.http_client.get("/")
response = self.http_client.get("/iiif/status/health")
assert response.status_code == 200
assert response.content == b"Connectivity OK"

@mock.patch("health.views.settings.DEBUG", True)
def test_debug_false(self):
response = self.http_client.get("/")
response = self.http_client.get("/iiif/status/health")
assert response.status_code == 500
assert response.content == b"Debug mode not allowed in production"

0 comments on commit 8ca2057

Please sign in to comment.