コード例 #1
0
ファイル: tests.py プロジェクト: ollb/weblate
 def test_example_pre(self):
     self.assertTrue(ExamplePreAddon.can_install(self.component, None))
     translation = self.get_translation()
     addon = ExamplePreAddon.create(self.component)
     addon.pre_commit(translation, '')
     self.assertIn(
         os.path.join(self.component.full_path,
                      'po/{}.po'.format(translation.language_code)),
         translation.addon_commit_files)
コード例 #2
0
ファイル: tests.py プロジェクト: nijel/weblate
 def test_example_pre(self):
     self.assertTrue(ExamplePreAddon.can_install(self.component, None))
     translation = self.get_translation()
     addon = ExamplePreAddon.create(self.component)
     addon.pre_commit(translation, '')
     self.assertIn(
         os.path.join(
             self.component.full_path,
             'po/{}.po'.format(translation.language_code)
         ),
         translation.addon_commit_files
     )