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

        self.endpoints_mock.list.return_value = [self.endpoint]

        # This is the return value for common.find_resource(service)
        self.services_mock.get.return_value = self.service

        # Get the command object to test
        self.cmd = endpoint.ListEndpoint(self.app, None)
Пример #2
0
    def setUp(self):
        super(TestEndpointList, self).setUp()

        self.endpoints_mock.list.return_value = [
            fakes.FakeResource(
                None,
                copy.deepcopy(identity_fakes.ENDPOINT),
                loaded=True,
            ),
        ]

        # This is the return value for common.find_resource(service)
        self.services_mock.get.return_value = fakes.FakeResource(
            None,
            copy.deepcopy(identity_fakes.SERVICE_WITHOUT_NAME),
            loaded=True,
        )

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