Esempio n. 1
0
 def test_scheduleTranslationTemplatesBuild_subscribed(self):
     # If the feature is enabled, a TipChanged event for a branch that
     # generates templates will schedule a templates build.
     branch = self._makeTranslationBranch()
     removeSecurityProxy(branch).last_scanned_id = 'null:'
     commit = DirectBranchCommit(branch)
     commit.writeFile('POTFILES.in', 'foo')
     commit.commit('message')
     notify(events.TipChanged(branch, None, False))
     branchjobs = list(TranslationTemplatesBuildJob.iterReady())
     self.assertEqual(1, len(branchjobs))
     self.assertEqual(branch, branchjobs[0].branch)
 def test_scheduleTranslationTemplatesBuild_subscribed(self):
     # If the feature is enabled, a TipChanged event for a branch that
     # generates templates will schedule a templates build.
     branch = self._makeTranslationBranch()
     removeSecurityProxy(branch).last_scanned_id = 'null:'
     commit = DirectBranchCommit(branch)
     commit.writeFile('POTFILES.in', 'foo')
     commit.commit('message')
     notify(events.TipChanged(branch, None, False))
     branchjobs = list(TranslationTemplatesBuildJob.iterReady())
     self.assertEqual(1, len(branchjobs))
     self.assertEqual(branch, branchjobs[0].branch)