'Verify product-specific ready for review notifications.'

def test_product_specific_ready(self):

    ApproveRevisionInLocaleEvent.notify(UserFactory(), locale='es')
    ApproveRevisionInLocaleEvent.notify(UserFactory(), product='firefox-os', locale='es')
    parent = DocumentFactory()
    doc = DocumentFactory(parent=parent, locale='es')
    parent.products.add(ProductFactory(slug='firefox'))
    self._review_revision(document=doc, is_ready=True, significance=MEDIUM_SIGNIFICANCE)
    eq_(3, len(mail.outbox))
    _assert_approved_mail(mail.outbox[0])
    _assert_creator_mail(mail.outbox[1])
    parent.products.add(ProductFactory(slug='firefox-os'))
    self._review_revision(document=doc, is_ready=True, significance=MEDIUM_SIGNIFICANCE)
    eq_(7, len(mail.outbox))
    _assert_approved_mail(mail.outbox[3])
    _assert_approved_mail(mail.outbox[4])
    _assert_creator_mail(mail.outbox[5])
    ApproveRevisionInLocaleEvent.notify(UserFactory(), product='firefox', locale='es')
    self._review_revision(document=doc, is_ready=True, significance=MEDIUM_SIGNIFICANCE)
    eq_(12, len(mail.outbox))
