def setUp(self):
        super(TestProjectCreate, self).setUp()

        self.project = identity_fakes.FakeProject.create_one_project(
            attrs={'domain_id': self.domain.id})
        self.domains_mock.get.return_value = self.domain
        self.projects_mock.create.return_value = self.project
        self.datalist = (self.project.description, self.project.domain_id,
                         True, self.project.id, False, self.project.name,
                         self.project.parent_id, self.project.tags)
        # Get the command object to test
        self.cmd = project.CreateProject(self.app, None)
Exemple #2
0
    def setUp(self):
        super(TestProjectCreate, self).setUp()

        self.domains_mock.get.return_value = fakes.FakeResource(
            None,
            copy.deepcopy(identity_fakes.DOMAIN),
            loaded=True,
        )

        self.projects_mock.create.return_value = fakes.FakeResource(
            None,
            copy.deepcopy(identity_fakes.PROJECT),
            loaded=True,
        )

        # Get the command object to test
        self.cmd = project.CreateProject(self.app, None)