Exemple #1
0
    def setUp(self):
        super(TestUserShow, self).setUp()

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

        # Get the command object to test
        self.cmd = user.ShowUser(self.app, None)
    def setUp(self):
        super(TestUserShow, self).setUp()

        self.users_mock.get.return_value = self.user

        # Get the command object to test
        self.cmd = user.ShowUser(self.app, None)
        self.app.client_manager.identity.auth.client.get_user_id.\
            return_value = self.user.id
        self.app.client_manager.identity.tokens.get_token_data.return_value = \
            {'token':
             {'user':
              {'domain': {'id': self.user.domain_id},
               'id': self.user.id,
               'name': self.user.name,
               }
              }
             }