Skip to content
Snippets Groups Projects
Commit 5afc98ea authored by Piotr Gawron's avatar Piotr Gawron
Browse files

additional test for get_visits_with_missing_appointments_count

parent 4746b436
No related branches found
No related tags found
1 merge request!31Tests added
Pipeline #
...@@ -21,7 +21,7 @@ from web.views.notifications import \ ...@@ -21,7 +21,7 @@ from web.views.notifications import \
get_today_midnight_date, \ get_today_midnight_date, \
get_unfinished_appointments, \ get_unfinished_appointments, \
get_unfinished_appointments_count, \ get_unfinished_appointments_count, \
get_unfinished_visits get_unfinished_visits, get_active_visits_with_missing_appointments
class NotificationViewTests(TestCase): class NotificationViewTests(TestCase):
...@@ -75,6 +75,22 @@ class NotificationViewTests(TestCase): ...@@ -75,6 +75,22 @@ class NotificationViewTests(TestCase):
notification = get_visits_with_missing_appointments_count(self.user) notification = get_visits_with_missing_appointments_count(self.user)
self.assertEquals(original_notification.count + 1, notification.count) self.assertEquals(original_notification.count + 1, notification.count)
def test_get_visits_with_missing_appointments_count_2(self):
original_notification = get_visits_with_missing_appointments_count(self.user)
appointment_type = create_appointment_type()
visit = create_visit()
visit.appointment_types.add(appointment_type)
visit.save()
appointment = create_appointment(visit)
appointment.appointment_types.add(appointment_type)
appointment.status=Appointment.APPOINTMENT_STATUS_FINISHED
appointment.save()
notification = get_visits_with_missing_appointments_count(self.user)
self.assertEquals(original_notification.count, notification.count)
def test_get_notifications(self): def test_get_notifications(self):
create_worker(self.user) create_worker(self.user)
result = get_notifications(self.user) result = get_notifications(self.user)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment