Esempio n. 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)
Esempio n. 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)
Esempio n. 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")
Esempio n. 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)
Esempio n. 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')
Esempio n. 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)