flectra/odoo/tests/addons/test_translation_import/tests.yml
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

14 lines
555 B
YAML

-
Load the french translation.
-
!python {model: ir.translation }: |
import odoo
odoo.tools.trans_load(cr, 'test_translation_import/i18n/fr.po', 'fr_FR', verbose=False)
-
Assert we have loaded the correct number of entries for the given source string.
-
!python {model: ir.translation }: |
translations = self.search(
[('src', '=', '1XBUO5PUYH2RYZSA1FTLRYS8SPCNU1UYXMEYMM25ASV7JC2KTJZQESZYRV9L8CGB')])
assert len(translations) == 2, "2 entries are expected, got %s instead." % len(translations)