示例#1
0
 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)
示例#2
0
 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)
示例#3
0
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)    
示例#4
0
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)
示例#5
0
 def _check_alarms(self, version):
     alarms.check_subtitle_version(version)
     alarms.check_other_languages_changes(version)
     alarms.check_language_name(version)