def test_lose_alert(self): v = self._new_version() s = self.latest_version.subtitle_set.all()[0] s.duplicate_for(v).save() alarms.check_subtitle_version(v) self.assertEquals(len(mail.outbox), 2)
def _check_alarm(version_id): from videos.models import SubtitleVersion from videos import alarms try: version = SubtitleVersion.objects.get(id=version_id) except SubtitleVersion.DoesNotExist: return alarms.check_subtitle_version(version) alarms.check_other_languages_changes(version) alarms.check_language_name(version)
def _check_alarms(self, version): alarms.check_subtitle_version(version) alarms.check_other_languages_changes(version) alarms.check_language_name(version)