-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -397,7 +397,7 @@ def setUp(self): | |
'client_email': '[email protected]', 'client_phone': '+12392350345', | ||
'client_address': '456 Outer Rim, Free Jaffa Nation', | ||
'want_reminder': 'false', 'additional_info': '', 'start_time': '15:00:26', | ||
'staff_id': self.staff_member1.id, | ||
'staff_member': self.staff_member1.id, | ||
'date': self.tomorrow.strftime('%Y-%m-%d') | ||
} | ||
|
||
|
@@ -773,7 +773,7 @@ def setUp(self): | |
|
||
def test_get_next_available_date_ajax(self): | ||
"""get_next_available_date_ajax view should return a JSON response with the next available date.""" | ||
data = {'staff_id': self.staff_member.id} | ||
data = {'staff_member': self.staff_member.id} | ||
url = reverse('appointment:request_next_available_slot', args=[self.service1.id]) | ||
response = self.client.get(url, data=data, HTTP_X_REQUESTED_WITH='XMLHttpRequest') | ||
self.assertEqual(response.status_code, 200) | ||
|
@@ -942,7 +942,7 @@ def setUp(self): | |
|
||
def test_no_staff_member_selected(self): | ||
"""Test the response when no staff member is selected.""" | ||
response = self.client.get(self.url, {'staff_id': 'none'}, HTTP_X_REQUESTED_WITH='XMLHttpRequest') | ||
response = self.client.get(self.url, {'staff_member': 'none'}, HTTP_X_REQUESTED_WITH='XMLHttpRequest') | ||
self.assertEqual(response.status_code, 200) | ||
response_data = response.json() | ||
self.assertFalse(response_data['success']) | ||
|
@@ -952,7 +952,7 @@ def test_no_staff_member_selected(self): | |
|
||
def test_valid_staff_member_selected(self): | ||
"""Test the response for a valid staff member selection.""" | ||
response = self.client.get(self.url, {'staff_id': self.staff_member1.id}, | ||
response = self.client.get(self.url, {'staff_member': self.staff_member1.id}, | ||
HTTP_X_REQUESTED_WITH='XMLHttpRequest') | ||
self.assertEqual(response.status_code, 200) | ||
response_data = response.json() | ||
|
@@ -963,7 +963,7 @@ def test_valid_staff_member_selected(self): | |
|
||
def test_ajax_required(self): | ||
"""Ensure the view only responds to AJAX requests.""" | ||
non_ajax_response = self.client.get(self.url, {'staff_id': self.staff_member1.id}) | ||
non_ajax_response = self.client.get(self.url, {'staff_member': self.staff_member1.id}) | ||
self.assertEqual(non_ajax_response.status_code, 200) | ||
|
||
|
||
|