def test_copy_custom_data(self): migrator = GroupMigrator(destination_directory=self.dst_dir, source_group=self.group) migrator.destination_group = migrator.get_destination_group() copied_group = migrator.copy_group() copied_custom_data = migrator.copy_custom_data() self.assertEqual(copied_custom_data['hi'], 'there')
def test_migrate(self): custom_data = self.group.custom_data migrator = GroupMigrator(destination_directory=self.dst_dir, source_group=self.group) copied_group = migrator.migrate() copied_custom_data = copied_group.custom_data self.assertEqual(copied_group.description, self.group.description) self.assertEqual(copied_group.name, self.group.name) self.assertEqual(copied_group.status, self.group.status) self.assertEqual(copied_custom_data['hi'], self.group.custom_data['hi'])
def test_copy_group(self): migrator = GroupMigrator(destination_directory=self.dst_dir, source_group=self.group) migrator.destination_group = migrator.get_destination_group() migrator.get_destination_group() copied_group = migrator.copy_group() self.assertTrue(copied_group) self.assertEqual(copied_group.description, self.group.description) self.assertEqual(copied_group.name, self.group.name) self.assertEqual(copied_group.status, self.group.status)