def test_fail_obsolete(self): # Obsolete translations are considered untranslated entry = POEntry(msgid="Source", msgstr="Translation", obsolete=True) status = Status() status.step(entry) self.assertFalse(untranslated_validator(status))
def test_fail_missing(self): entry = POEntry(msgid="Source", msgstr="") status = Status() status.step(entry) self.assertFalse(untranslated_validator(status))
def test_fail_fuzzy(self): # Fuzzy translations are considered untranslated entry = POEntry(msgid="Source", msgstr="Translation", flags=['fuzzy']) status = Status() status.step(entry) self.assertFalse(untranslated_validator(status))
def test_pass(self): entry = POEntry(msgid="Source", msgstr="Translation") status = Status() status.step(entry) self.assertTrue(untranslated_validator(status))