def no_discrepancies_test(self): # both of the incoming batches self.create_batch(VumiLogFactory, 5) self.create_batch(SMSFactory, 5, carrier=self.vumi_backend) audit_incoming_sms() discrepancies = models.Discrepancy.objects.all() self.assertEqual(discrepancies.count(), 0)
def discrepancies_found_test(self): self.create_batch(VumiLogFactory, 6) self.create_batch(SMSFactory, 5, carrier=self.vumi_backend) audit_incoming_sms() discrepancies = models.Discrepancy.objects.all() self.assertEqual(discrepancies.count(), 1)