'Sets up groups and user partitions for testing.'

def setup_groups_partitions(self, num_user_partitions=1, num_groups=4, active=True):

    self.groups = []
    for group_num in range(1, (num_groups + 1)):
        self.groups.append(Group(group_num, ('Group    ' + unicode(group_num))))
    self.user_partitions = []
    for user_partition_num in range(1, (num_user_partitions + 1)):
        user_partition = UserPartition(id=user_partition_num, name=('Partition    ' + unicode(user_partition_num)), description=('This    is    partition    ' + unicode(user_partition_num)), groups=self.groups, scheme=CohortPartitionScheme, active=active)
        user_partition.scheme.name = 'cohort'
        self.user_partitions.append(user_partition)
