def test_notify_merge_failure(self): notify_merge_failure(self.subproject, 'Failed merge', 'Error\nstatus') # Check mail self.assertEqual(len(mail.outbox), 1) self.assertEqual(mail.outbox[0].subject, '[Weblate] Merge failure in Test/Test')
def notify_merge_failure(self, error, status): ''' Sends out notifications on merge failure. ''' # Notify subscribed users about failure from accounts.models import notify_merge_failure notify_merge_failure(self, error, status)
def test_notify_merge_failure(self): notify_merge_failure( self.subproject, 'Failed merge', 'Error\nstatus' ) # Check mail (second one is for admin) self.assertEqual(len(mail.outbox), 2) self.assertEqual( mail.outbox[0].subject, '[Weblate] Merge failure in Test/Test' )