Example #1
0
 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)
Example #2
0
 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)
Example #3
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")
Example #4
0
 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)
Example #5
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')
Example #6
0
 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)