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)
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)
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)
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, [])
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]))
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]) )