예제 #1
0
    def setUp(self):
        super(TestProjectSet, self).setUp()

        self.domains_mock.get.return_value = self.domain

        self.projects_mock.get.return_value = self.project
        self.projects_mock.update.return_value = self.project

        # Get the command object to test
        self.cmd = project.SetProject(self.app, None)
예제 #2
0
    def setUp(self):
        super(TestProjectSet, self).setUp()

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

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

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