def test_xliff_compile(self):

        self.test_xliff_save2db(delete=False)
        handler = XliffHandler()
        handler.bind_resource(self.resource)
        handler.set_language(self.resource.source_language)
        old_template = handler.compiled_template
        handler.compile()
        self.assertNotEqual(old_template, handler.compiled_template)

        handler.set_language(self.language_ar)
        old_template = handler.compiled_template
        handler.compile()
        self.assertNotEqual(old_template, handler.compiled_template)

        handler.bind_resource(self.resource_new)
        handler.set_language(self.resource_new.source_language)
        old_template = handler.compiled_template
        handler.compile()
        self.assertNotEqual(old_template, handler.compiled_template)

        handler.set_language(self.language_ar)
        old_template = handler.compiled_template
        handler.compile()
        self.assertNotEqual(old_template, handler.compiled_template)

        #Cleanup
        self.resource.delete()
        self.resource_new.delete()
Test compiling translations for XLIFF files
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/resources/tests/lib/xliff/__init__.py/TestXliffParser.test_xliff_compile