def testSetGetLocale(self): translator = Translator('en') self.assertEquals('en', translator.locale) translator.locale = 'fr' self.assertEquals('fr', translator.locale)
def testget_catalogue(self): translator = Translator('en') self.assertEquals(MessageCatalogue('en'), translator.get_catalogue()) translator.locale = 'fr' self.assertEquals(MessageCatalogue('fr'), translator.get_catalogue('fr'))
def testget_catalogue(self): translator = Translator('en') self.assertEquals(MessageCatalogue('en'), translator.get_catalogue()) translator.locale = 'fr' self.assertEquals( MessageCatalogue('fr'), translator.get_catalogue('fr'))
def testSetValidLocale(self): for locale, in self.getValidLocalesTests(): translator = Translator(locale) translator.locale = locale self.assertEquals(locale, translator.locale)