Example #1
0
 def test_update(self):
     MsgmergeAddon.create(self.subproject)
     TestAddon.create(self.subproject)
     rev = self.subproject.repository.last_revision
     self.subproject.update_branch()
     self.assertNotEqual(rev, self.subproject.repository.last_revision)
     commit = self.subproject.repository.show(
         self.subproject.repository.last_revision)
     self.assertIn('po/cs.po', commit)
Example #2
0
 def test_msgmerge(self):
     self.assertTrue(MsgmergeAddon.is_compatible(self.subproject))
     addon = MsgmergeAddon.create(self.subproject)
     rev = self.subproject.repository.last_revision
     addon.post_update(self.subproject, '')
     self.assertNotEqual(rev, self.subproject.repository.last_revision)
     commit = self.subproject.repository.show(
         self.subproject.repository.last_revision)
     self.assertIn('po/cs.po', commit)
Example #3
0
 def test_msgmerge(self):
     self.assertTrue(MsgmergeAddon.can_install(self.component, None))
     addon = MsgmergeAddon.create(self.component)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, '')
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision)
     self.assertIn('po/cs.po', commit)
Example #4
0
 def test_update(self):
     rev = self.component.repository.last_revision
     MsgmergeAddon.create(self.component)
     TestAddon.create(self.component)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     rev = self.component.repository.last_revision
     self.component.trigger_post_update("x", False)
     self.assertEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("po/cs.po", commit)
Example #5
0
 def test_msgmerge(self):
     self.assertTrue(MsgmergeAddon.can_install(self.component, None))
     addon = MsgmergeAddon.create(self.component)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, '')
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision
     )
     self.assertIn('po/cs.po', commit)
Example #6
0
 def test_update(self):
     MsgmergeAddon.create(self.component)
     TestAddon.create(self.component)
     rev = self.component.repository.last_revision
     self.component.update_branch()
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision
     )
     self.assertIn('po/cs.po', commit)
Example #7
0
 def test_msgmerge(self, wrapped=True):
     self.assertTrue(MsgmergeAddon.can_install(self.component, None))
     addon = MsgmergeAddon.create(self.component)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, '')
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision)
     self.assertIn('po/cs.po', commit)
     self.assertEqual('msgid "Try using Weblate demo' in commit,
                      not wrapped)
Example #8
0
 def test_msgmerge(self, wrapped=True):
     self.assertTrue(MsgmergeAddon.can_install(self.component, None))
     rev = self.component.repository.last_revision
     addon = MsgmergeAddon.create(self.component)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, '')
     self.assertEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision
     )
     self.assertIn('po/cs.po', commit)
     self.assertEqual(
         'msgid "Try using Weblate demo' in commit,
         not wrapped
     )