

def setUp(self):
    self.users = {
        'owner': structure_factories.UserFactory(),
        'admin': structure_factories.UserFactory(),
        'manager': structure_factories.UserFactory(),
        'group_manager': structure_factories.UserFactory(),
    }
    self.customer = structure_factories.CustomerFactory()
    self.customer.add_user(self.users['owner'], CustomerRole.OWNER)
    self.clouds = {
        'admin': factories.CloudFactory(customer=self.customer),
        'manager': factories.CloudFactory(customer=self.customer),
        'group_manager': factories.CloudFactory(customer=self.customer),
    }
    self.projects = {
        'admin': structure_factories.ProjectFactory(customer=self.customer),
        'manager': structure_factories.ProjectFactory(customer=self.customer),
        'group_manager': structure_factories.ProjectFactory(customer=self.customer),
    }
    self.projects['admin'].add_user(self.users['admin'], ProjectRole.ADMINISTRATOR)
    self.projects['manager'].add_user(self.users['manager'], ProjectRole.MANAGER)
    project_group = structure_factories.ProjectGroupFactory(customer=self.customer)
    project_group.projects.add(self.projects['group_manager'])
    project_group.add_user(project_group.users['group_manager'], ProjectGroupRole.MANAGER)
    factories.CloudProjectMembershipFactory(project=self.projects['admin'], cloud=self.clouds['admin'])
    factories.CloudProjectMembershipFactory(project=self.projects['manager'], cloud=self.clouds['manager'])
    factories.CloudProjectMembershipFactory(project=self.projects['group_manager'], cloud=self.clouds['group_manager'])

dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/tests/test_customer_addendum.py CustomerAddendumApiPermissionTest.setUp/VarMisuse@255/339 `self`->`project_group`