407
407
merge_proposal_modified(merge_proposal, event)
408
408
self.assertIs(None, self.getProposalUpdatedEmailJob(merge_proposal))
410
def test_no_job_created_if_only_preview_diff_changed(self):
411
"""Ensure None is returned if only the preview diff has changed."""
412
merge_proposal, person = self.makeProposalWithSubscriber()
413
old_merge_proposal = Snapshot(
414
merge_proposal, providing=providedBy(merge_proposal))
415
merge_proposal.updatePreviewDiff(
416
''.join(unified_diff('', 'Fake diff')),
417
unicode(self.factory.getUniqueString('revid')),
418
unicode(self.factory.getUniqueString('revid')))
419
event = ObjectModifiedEvent(
420
merge_proposal, old_merge_proposal, [], merge_proposal.registrant)
421
merge_proposal_modified(merge_proposal, event)
422
self.assertIs(None, self.getProposalUpdatedEmailJob(merge_proposal))
410
424
def test_no_job_created_if_work_in_progress(self):
411
425
"""Ensure None is returned if no change has been made."""
412
426
merge_proposal, person = self.makeProposalWithSubscriber(