'Test deleting a stack user.'

def test_delete_stack_user(self):

    self._stubs_auth()
    ctx = utils.dummy_context()
    ctx.trust_id = None
    self.mock_ks_v3_client.users = self.m.CreateMockAnything()
    self.mock_ks_v3_client.users.delete(user='atestuser').AndReturn(None)
    self.mock_ks_v3_client.users.delete(user='atestuser').AndRaise(kc_exception.NotFound)
    self.m.ReplayAll()
    heat_ks_client = heat_keystoneclient.KeystoneClient(ctx)
    heat_ks_client.delete_stack_user('atestuser')
    heat_ks_client.delete_stack_user('atestuser')
