def test_remove_untranslated_strings(self): tmpfile = tempfile.NamedTemporaryFile() filename = tmpfile.name + ".po" self._create_po_with_untranslated_strings(filename) poFile = POFile(filename) poFile._remove_untranslated_strings() po = polib.pofile(filename) self.assertEquals(1, len(po))