示例#1
0
 def test_update_configure(self):
     translation = self.get_translation()
     self.assertTrue(
         UpdateConfigureAddon.can_install(translation.component, None))
     addon = UpdateConfigureAddon.create(translation.component)
     addon.post_add(translation)
     self.assertEqual(translation.addon_commit_files, [])
示例#2
0
文件: tests.py 项目: tm1000/weblate
 def test_update_configure(self):
     translation = self.get_translation()
     self.assertTrue(
         UpdateConfigureAddon.is_compatible(translation.subproject))
     addon = UpdateConfigureAddon.create(translation.subproject)
     addon.post_add(translation)
     self.assertTrue(os.path.exists(translation.addon_commit_files[0]))
示例#3
0
文件: tests.py 项目: renatofb/weblate
 def test_add(self):
     UpdateLinguasAddon.create(self.component)
     UpdateConfigureAddon.create(self.component)
     TestAddon.create(self.component)
     rev = self.component.repository.last_revision
     self.component.add_new_language(Language.objects.get(code="sk"), None)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("po/LINGUAS", commit)
     self.assertIn("configure", commit)
示例#4
0
文件: tests.py 项目: nijel/weblate
 def test_update_configure(self):
     translation = self.get_translation()
     self.assertTrue(
         UpdateConfigureAddon.can_install(translation.component, None)
     )
     addon = UpdateConfigureAddon.create(translation.component)
     addon.post_add(translation)
     self.assertTrue(
         os.path.exists(translation.addon_commit_files[0])
     )
示例#5
0
文件: tests.py 项目: tm1000/weblate
 def test_add(self):
     UpdateLinguasAddon.create(self.subproject)
     UpdateConfigureAddon.create(self.subproject)
     TestAddon.create(self.subproject)
     rev = self.subproject.repository.last_revision
     self.subproject.add_new_language(Language.objects.get(code='sk'), None)
     self.assertNotEqual(rev, self.subproject.repository.last_revision)
     commit = self.subproject.repository.show(
         self.subproject.repository.last_revision)
     self.assertIn('po/LINGUAS', commit)
     self.assertIn('configure', commit)
示例#6
0
文件: tests.py 项目: nijel/weblate
 def test_add(self):
     UpdateLinguasAddon.create(self.component)
     UpdateConfigureAddon.create(self.component)
     TestAddon.create(self.component)
     rev = self.component.repository.last_revision
     self.component.add_new_language(
         Language.objects.get(code='sk'), None
     )
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision
     )
     self.assertIn('po/LINGUAS', commit)
     self.assertIn('configure', commit)