def testRenameGroup_03_self(self): os.mkdir(self.tempDir1) collection = IconsCollection(self.tempDir1) collection.addGroup(u'Новая группа') collection.renameGroup(u'Новая группа', u'Новая группа') self.assertEqual(collection.getGroups(), [u'Новая группа']) newcollection = IconsCollection(self.tempDir1) self.assertEqual(newcollection.getGroups(), [u'Новая группа'])
def testRenameGroup_03_self(self): os.mkdir(self.tempDir1) collection = IconsCollection(self.tempDir1) collection.addGroup('Новая группа') collection.renameGroup('Новая группа', 'Новая группа') self.assertEqual(collection.getGroups(), ['Новая группа']) newcollection = IconsCollection(self.tempDir1) self.assertEqual(newcollection.getGroups(), ['Новая группа'])
def testRenameGroup_01 (self): os.mkdir (self.tempDir1) collection = IconsCollection (self.tempDir1) collection.addGroup (u'Новая группа') self.assertEqual (collection.getGroups(), [u'Новая группа']) collection.renameGroup (u'Новая группа', u'Переименованная группа') self.assertEqual (collection.getGroups(), [u'Переименованная группа']) newcollection1 = IconsCollection (self.tempDir1) self.assertEqual (newcollection1.getGroups(), [u'Переименованная группа'])
def testRenameGroup_01(self): os.mkdir(self.tempDir1) collection = IconsCollection(self.tempDir1) collection.addGroup('Новая группа') self.assertEqual(collection.getGroups(), ['Новая группа']) collection.renameGroup('Новая группа', 'Переименованная группа') self.assertEqual(collection.getGroups(), ['Переименованная группа']) newcollection1 = IconsCollection(self.tempDir1) self.assertEqual(newcollection1.getGroups(), ['Переименованная группа'])
def testRenameGroup_04_self(self): files = [u'new.png', u'image_01.JPG'] fullPaths = [os.path.join(self.imagesDir, fname) for fname in files] os.mkdir(self.tempDir1) collection = IconsCollection(self.tempDir1) collection.addGroup(u'Новая группа') collection.addIcons(u'Новая группа', fullPaths) collection.renameGroup(u'Новая группа', u'Новая группа') self.assertEqual(collection.getGroups(), [u'Новая группа']) self.assertEqual(len(collection.getIcons(u'Новая группа')), 2) newcollection = IconsCollection(self.tempDir1) self.assertEqual(newcollection.getGroups(), [u'Новая группа']) self.assertEqual(len(newcollection.getIcons(u'Новая группа')), 2)
def testRenameGroup_04_self(self): files = ['new.png', 'image_01.JPG'] fullPaths = [os.path.join(self.imagesDir, fname) for fname in files] os.mkdir(self.tempDir1) collection = IconsCollection(self.tempDir1) collection.addGroup('Новая группа') collection.addIcons('Новая группа', fullPaths) collection.renameGroup('Новая группа', 'Новая группа') self.assertEqual(collection.getGroups(), ['Новая группа']) self.assertEqual(len(collection.getIcons('Новая группа')), 2) newcollection = IconsCollection(self.tempDir1) self.assertEqual(newcollection.getGroups(), ['Новая группа']) self.assertEqual(len(newcollection.getIcons('Новая группа')), 2)