Skip to content
Snippets Groups Projects

Tests added

Merged Piotr Gawron requested to merge tests into master
1 file
+ 17
1
Compare changes
  • Side-by-side
  • Inline
@@ -21,7 +21,7 @@ from web.views.notifications import \
get_today_midnight_date, \
get_unfinished_appointments, \
get_unfinished_appointments_count, \
get_unfinished_visits
get_unfinished_visits, get_active_visits_with_missing_appointments
class NotificationViewTests(TestCase):
@@ -75,6 +75,22 @@ class NotificationViewTests(TestCase):
notification = get_visits_with_missing_appointments_count(self.user)
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):
create_worker(self.user)
result = get_notifications(self.user)
Loading