def test_get_pofiles_for_untranslated_template(self): # If there is no POFile for a template in a language, # get_pofiles_for makes up a DummyPOFile. # Avoid circular imports. from lp.translations.model.pofile import DummyPOFile pofiles = get_pofiles_for([self.potemplate], self.greek) pofile = pofiles[0] self.assertIsInstance(pofile, DummyPOFile)
def test_get_pofiles_for_untranslated_template(self): # If there is no POFile for a template in a language, # get_pofiles_for makes up a DummyPOFile. # Avoid circular imports. from lp.translations.model.pofile import DummyPOFile pofiles = get_pofiles_for([self.potemplate], self.greek) pofile = pofiles[0] self.assertIsInstance(pofile, DummyPOFile)
def test_get_pofiles_for_translated_template(self): # get_pofiles_for finds a POFile for a given template in a given # language. greek_pofile = self._makePOFile() pofiles = get_pofiles_for([self.potemplate], self.greek) self.assertEqual([greek_pofile], pofiles)
def test_get_pofiles_for_empty_template_list(self): # get_pofiles_for sensibly returns the empty list for an empty # template list. pofiles = get_pofiles_for([], self.greek) self.assertEqual([], pofiles)
def getPOFilesFor(self, potemplates): """See `IDistroSeriesLanguage`.""" return get_pofiles_for(potemplates, self.language)
def getPOFilesFor(self, potemplates): """See `IDistroSeriesLanguage`.""" return get_pofiles_for(potemplates, self.language)
def test_get_pofiles_for_translated_template(self): # get_pofiles_for finds a POFile for a given template in a given # language. greek_pofile = self._makePOFile() pofiles = get_pofiles_for([self.potemplate], self.greek) self.assertEqual([greek_pofile], pofiles)
def test_get_pofiles_for_empty_template_list(self): # get_pofiles_for sensibly returns the empty list for an empty # template list. pofiles = get_pofiles_for([], self.greek) self.assertEqual([], pofiles)