def test_getalltexts(self): t = MultiStringTranslation('de') t._catalog['KEY'] = ['VALUE1', 'VALUE2', 'VALUE3'] self.assertEqual(t.getalltexts('KEY'), ['VALUE1', 'VALUE2', 'VALUE3']) from skill_sdk.l10n import _a l10n.set_current_locale(t) self.assertEqual(_a('KEY'), ['VALUE1', 'VALUE2', 'VALUE3'])
def test_getalltexts_empty_catalog(self): t = MultiStringTranslation('de') self.assertEqual(t.getalltexts('ABC'), ['ABC'])