def test_gettext_comment(self): translation = self.get_translation() self.assertTrue(GettextAuthorComments.can_install(translation.component, None)) addon = GettextAuthorComments.create(translation.component) addon.pre_commit(translation, "Stojan Jakotyc <*****@*****.**>") with open(translation.get_filename()) as handle: content = handle.read() self.assertIn("Stojan Jakotyc", content)
def test_gettext_comment(self): translation = self.get_translation() self.assertTrue( GettextAuthorComments.can_install(translation.component, None) ) addon = GettextAuthorComments.create(translation.component) addon.pre_commit(translation, 'Stojan Jakotyc <*****@*****.**>') with open(translation.get_filename(), 'r') as handle: content = handle.read() self.assertIn('Stojan Jakotyc', content)