Exemple #1
0
    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')
Exemple #2
0
 def notify_merge_failure(self, error, status):
     '''
     Sends out notifications on merge failure.
     '''
     # Notify subscribed users about failure
     from weblate.accounts.models import notify_merge_failure
     notify_merge_failure(self, error, status)
Exemple #3
0
 def notify_merge_failure(self, error, status):
     '''
     Sends out notifications on merge failure.
     '''
     # Notify subscribed users about failure
     from weblate.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")

        # Add project owner
        self.subproject.project.owners.add(self.second_user())
        notify_merge_failure(self.subproject, "Failed merge", "Error\nstatus")

        # Check mail (second one is for admin)
        self.assertEqual(len(mail.outbox), 5)
Exemple #5
0
    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'
        )
    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')

        # Add project owner
        self.subproject.project.add_user(self.second_user(), '@Administration')
        notify_merge_failure(self.subproject, 'Failed merge', 'Error\nstatus')

        # Check mail (second one is for admin)
        self.assertEqual(len(mail.outbox), 5)
Exemple #7
0
 def notify_merge_failure(self, error, status):
     '''
     Sends out notifications on merge failure.
     '''
     # Notify subscribed users about failure
     notify_merge_failure(self, error, status)
Exemple #8
0
 def notify_merge_failure(self, error, status):
     '''
     Sends out notifications on merge failure.
     '''
     # Notify subscribed users about failure
     notify_merge_failure(self, error, status)