def test_buildsetComplete_calls_sendBSS(self):
        notifier = BuildSetSummaryNotifierMixin()
        fakeBSS = Mock()
        notifier.sendBuildSetSummary = fakeBSS

        info = {}

        d = self.run_fake_build(notifier, info)

        @d.addCallback
        def check(_):
            self.assertEqual(fakeBSS.call_count, 1)

            # Check that the arguments given to fakeBSS match the builds array
            # we constructed, and that the buildsetid matches. We can't easily
            # check that the buildrequest itself entirely matches, since many
            # of the fields are constructed not by us directly.
            ((buildset, builds), _) = fakeBSS.call_args
            self.assertEqual(builds, info['builds'])

            self.assertEqual(buildset['bsid'], info['bsid'])
Exemple #2
0
 def test_buildsetComplete_raises_notimplementederror(self):
     notifier = BuildSetSummaryNotifierMixin()
     self.assertFailure(self.run_fake_build(notifier), NotImplementedError)
 def test_unsub_with_no_sub(self):
     notifier = BuildSetSummaryNotifierMixin()
     notifier.summaryUnsubscribe()
Exemple #4
0
 def test_unsub_with_no_sub(self):
     notifier = BuildSetSummaryNotifierMixin()
     notifier.summaryUnsubscribe()