Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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
     )