Exemplo n.º 1
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     rev = self.component.repository.last_revision
     addon = CleanupAddon.create(self.component)
     addon.post_update(self.component, "da07dc0dc7052dc44eadfa8f3a2f2609ec634303")
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("csv-mono/cs.csv", commit)
Exemplo n.º 2
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.is_compatible(self.subproject))
     addon = CleanupAddon.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('json-mono-sync/cs.json', commit)
Exemplo n.º 3
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.is_compatible(self.subproject))
     addon = CleanupAddon.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('android-not-synced/values-cs/strings.xml', commit)
Exemplo n.º 4
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     addon = CleanupAddon.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('json-mono-sync/cs.json', commit)
Exemplo n.º 5
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     addon = CleanupAddon.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('android-not-synced/values-cs/strings.xml', commit)
Exemplo n.º 6
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.is_compatible(self.subproject))
     addon = CleanupAddon.create(self.subproject)
     rev = self.subproject.repository.last_revision
     addon.post_update(self.subproject,
                       'da07dc0dc7052dc44eadfa8f3a2f2609ec634303')
     self.assertNotEqual(rev, self.subproject.repository.last_revision)
     commit = self.subproject.repository.show(
         self.subproject.repository.last_revision)
     self.assertIn('resx/cs.resx', commit)
Exemplo n.º 7
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     addon = CleanupAddon.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('json-mono-sync/cs.json', commit)
Exemplo n.º 8
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     addon = CleanupAddon.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('android-not-synced/values-cs/strings.xml', commit)
Exemplo n.º 9
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     rev = self.component.repository.last_revision
     addon = CleanupAddon.create(self.component)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, "", False)
     self.assertEqual(rev, self.component.repository.last_revision)
     addon.post_update(self.component, "", False)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("cs/changelogs/100000.txt", commit)
Exemplo n.º 10
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     rev = self.component.repository.last_revision
     addon = CleanupAddon.create(self.component)
     # Unshallow the local repo
     with self.component.repository.lock:
         self.component.repository.execute(["fetch", "--unshallow", "origin"])
     addon.post_update(self.component, "da07dc0dc7052dc44eadfa8f3a2f2609ec634303")
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("resx/cs.resx", commit)
Exemplo n.º 11
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     rev = self.component.repository.last_revision
     addon = CleanupAddon.create(self.component)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, "", False)
     self.assertEqual(rev, self.component.repository.last_revision)
     addon.post_update(self.component, "", False)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("winrc/cs-CZ.rc", commit)
     self.assertIn("\n-IDS_MSG5", commit)
Exemplo n.º 12
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     rev = self.component.repository.last_revision
     addon = CleanupAddon.create(self.component)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, "", False)
     self.assertEqual(rev, self.component.repository.last_revision)
     addon.post_update(self.component, "", False)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("android-not-synced/values-cs/strings.xml", commit)
     self.assertIn('\n-    <string name="hello">Ahoj svete</string>', commit)
Exemplo n.º 13
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     addon = CleanupAddon.create(self.component)
     rev = self.component.repository.last_revision
     addon.post_update(
         self.component, 'da07dc0dc7052dc44eadfa8f3a2f2609ec634303'
     )
     self.assertNotEqual(rev, self.component.repository.last_revision)
     commit = self.component.repository.show(
         self.component.repository.last_revision
     )
     self.assertIn('resx/cs.resx', commit)
Exemplo n.º 14
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     rev = self.component.repository.last_revision
     addon = CleanupAddon.create(self.component)
     self.assertNotEqual(rev, self.component.repository.last_revision)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, "", False)
     self.assertEqual(rev, self.component.repository.last_revision)
     addon.post_update(self.component, "", False)
     commit = self.component.repository.show(self.component.repository.last_revision)
     # It should remove string not present in the English file
     self.assertIn("intermediate/cs.json", commit)
     self.assertIn('-    "orangutan"', commit)
Exemplo n.º 15
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     rev = self.component.repository.last_revision
     addon = CleanupAddon.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)
     addon.post_update(self.component, '')
     commit = self.component.repository.show(
         self.component.repository.last_revision
     )
     self.assertIn('cs/changelogs/100000.txt', commit)
Exemplo n.º 16
0
 def test_cleanup(self):
     self.assertTrue(CleanupAddon.can_install(self.component, None))
     init_rev = self.component.repository.last_revision
     addon = CleanupAddon.create(self.component)
     self.assertNotEqual(init_rev, self.component.repository.last_revision)
     rev = self.component.repository.last_revision
     addon.post_update(self.component, "", False)
     self.assertEqual(rev, self.component.repository.last_revision)
     addon.post_update(self.component, "", False)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("java/swing_messages_cs.properties", commit)
     self.component.do_reset()
     self.edit_unit("Hello, world!\n", "Nazdar svete!\n")
     self.get_translation().commit_pending("test", None)
     self.assertNotEqual(init_rev, self.component.repository.last_revision)
     commit = self.component.repository.show(self.component.repository.last_revision)
     self.assertIn("java/swing_messages_cs.properties", commit)
     self.assertIn("-state=Stale", commit)