

def build_to_organizations(self):
    'Build out system to the organization level.'
    for organization_num in range(2):
        name = ('Test Organization %d' % organization_num)
        if (organization_num < (self.num_orgs / 2)):
            new_organization = Organization.objects.create(name=name, owner=self.test_user_0)
            new_organization.editors.add(self.test_user_0)
        else:
            new_organization = Organization.objects.create(name=name, owner=self.test_user_1)
            new_organization.editors.add(self.test_user_1)
        self.test_organizations.append(new_organization)

dataset/ETHPy150Open openlearningtools/opencompetencies/users/tests.py UserViewTests.build_to_organizations/original