Exemplo n.º 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')
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 4
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")

        # 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)
Exemplo n.º 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'
        )
Exemplo n.º 6
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')

        # 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)
Exemplo n.º 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)
Exemplo n.º 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)