示例#1
0
文件: tests.py 项目: renatofb/weblate
 def test_customize_tabs(self):
     JSONCustomizeAddon.create(
         self.component, configuration={"indent": 8, "sort": 1, "style": "tabs"}
     )
     rev = self.component.repository.last_revision
     self.edit_unit("Hello, world!\n", "Nazdar svete!\n")
     self.get_translation().commit_pending("test", None)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn('\t\t\t\t\t\t\t\t"try"', commit)
示例#2
0
文件: tests.py 项目: tdelmas/weblate
 def test_customize(self):
     JSONCustomizeAddon.create(
         self.component, configuration={'indent': 8, 'sort': 1}
     )
     rev = self.component.repository.last_revision
     self.edit_unit('Hello, world!\n', 'Nazdar svete!\n')
     self.get_translation().commit_pending('test', None)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn('        "try"', commit)
示例#3
0
文件: tests.py 项目: ollb/weblate
 def test_customize(self):
     if not JSONCustomizeAddon.can_install(self.component, None):
         raise SkipTest('json dump configuration not supported')
     JSONCustomizeAddon.create(self.component,
                               configuration={
                                   'indent': 8,
                                   'sort': 1
                               })
     # Empty addons cache
     self.component.addons_cache = {}
     rev = self.component.repository.last_revision
     self.edit_unit('Hello, world!\n', 'Nazdar svete!\n')
     self.get_translation().commit_pending('test', None)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision)
     self.assertIn('        "try"', commit)
示例#4
0
文件: tests.py 项目: nijel/weblate
 def test_customize(self):
     if not JSONCustomizeAddon.can_install(self.component, None):
         raise SkipTest('json dump configuration not supported')
     JSONCustomizeAddon.create(
         self.component,
         configuration={'indent': 8, 'sort': 1}
     )
     # Empty addons cache
     self.component.addons_cache = {}
     rev = self.component.repository.last_revision
     self.edit_unit('Hello, world!\n', 'Nazdar svete!\n')
     self.get_translation().commit_pending('test', None)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision
     )
     self.assertIn(
         '        "try"',
         commit
     )