def test_signal_create_twice(self): v = Version.objects.create(addon=self.addon) version_uploaded.send(sender=v) mail.outbox = [] v = Version.objects.create(addon=self.addon) version_uploaded.send(sender=v) eq_(len(mail.outbox), 0)
def test_signal_create(self): v = Version.objects.create(addon=self.addon) version_uploaded.send(sender=v) eq_(len(mail.outbox), 2) eq_(mail.outbox[0].subject, "Mozilla Add-ons: Delicious Bookmarks Updated")
def test_notifications_beta(self): self.version.all_files[0].update(status=amo.STATUS_BETA) version_uploaded.send(sender=self.version) eq_(len(mail.outbox), 0)
def test_signal_create(self): v = Version.objects.create(addon=self.addon) version_uploaded.send(sender=v) eq_(len(mail.outbox), 2) eq_(mail.outbox[0].subject, 'Mozilla Add-ons: Delicious Bookmarks Updated')