'Test deleting a stack domain user, wrong domain.'

def test_delete_stack_domain_user_error_domain(self):

    ctx = utils.dummy_context()
    self.patchobject(ctx, '_create_auth_plugin')
    ctx.trust_id = None
    self._stub_domain_admin_client()
    self.mock_admin_client.users = self.m.CreateMockAnything()
    mock_user = self.m.CreateMockAnything()
    mock_user.id = 'duser123'
    mock_user.domain_id = 'notadomain123'
    mock_user.default_project_id = 'aproject'
    self.mock_admin_client.users.get('duser123').AndReturn(mock_user)
    self.m.ReplayAll()
    heat_ks_client = heat_keystoneclient.KeystoneClient(ctx)
    err = self.assertRaises(ValueError, heat_ks_client.delete_stack_domain_user, user_id='duser123', project_id='aproject')
    self.assertIn('User    delete    in    invalid    domain', err.args)
