From fa252691b6dc7f0e99258236d0e5c4e3da91eca1 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Wed, 19 Feb 2025 12:41:17 +0530 Subject: [PATCH] test: update status codes --- frappe/tests/test_document.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/tests/test_document.py b/frappe/tests/test_document.py index e6fac5ef68..b970f8068a 100644 --- a/frappe/tests/test_document.py +++ b/frappe/tests/test_document.py @@ -542,7 +542,7 @@ class TestDocumentWebView(IntegrationTestCase): self.assertEqual(self.get(url).status, "200 OK") with self.change_settings("System Settings", {"allow_older_web_view_links": False}): - self.assertEqual(self.get(url).status, "401 UNAUTHORIZED") + self.assertEqual(self.get(url).status, "403 FORBIDDEN") # with valid key url = f"/ToDo/{todo.name}?key={document_key}" @@ -550,7 +550,7 @@ class TestDocumentWebView(IntegrationTestCase): # with invalid key invalid_key_url = f"/ToDo/{todo.name}?key=INVALID_KEY" - self.assertEqual(self.get(invalid_key_url).status, "401 UNAUTHORIZED") + self.assertEqual(self.get(invalid_key_url).status, "403 FORBIDDEN") # expire the key document_key_doc = frappe.get_doc("Document Share Key", {"key": document_key})