Skip to content

Commit ea7ee21

Browse files
committed
Fix corresponding tests
1 parent 098345d commit ea7ee21

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

appointment/tests/test_views.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def test_fetch_service_list_for_staff(self):
339339
)
340340

341341
def test_fetch_service_list_for_staff_no_staff_member_instance(self):
342-
"""Test that a superuser without a StaffMember instance receives an appropriate error message."""
342+
"""Test that a superuser without a StaffMember instance receives no inappropriate error message."""
343343
self.need_superuser_login()
344344

345345
# Ensure the superuser does not have a StaffMember instance
@@ -349,11 +349,9 @@ def test_fetch_service_list_for_staff_no_staff_member_instance(self):
349349
response = self.client.get(url, HTTP_X_REQUESTED_WITH='XMLHttpRequest')
350350

351351
# Check the response status code and content
352-
self.assertEqual(response.status_code, 400)
352+
self.assertEqual(response.status_code, 200)
353353
response_data = response.json()
354354
self.assertIn('message', response_data)
355-
self.assertEqual(response_data['message'], _("You're not a staff member. Can't perform this action !"))
356-
self.assertFalse(response_data['success'])
357355

358356
def test_fetch_service_list_for_staff_no_services_offered(self):
359357
"""Test fetching services for a staff member who offers no services."""

0 commit comments

Comments
 (0)