def audit_sms(): discrepancies = audit_incoming_sms() discrepancies.extend(audit_outgoing_sms()) if discrepancies: # notify interested parties send_notifications(subscription_type=Subscription.DISCREPANCIES, discrepancies=discrepancies)
def test_notifications_sent(self): send_notifications(subscription_type=models.Subscription.DISCREPANCIES) self.assertEqual(len(mail.outbox), 10)