From 23ca656927947dada40591bdd1badd5a531c2983 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Wed, 28 Mar 2012 10:37:16 -0700 Subject: Refactor 404's into managers & drivers (bug 968519) The goal is to move the responsibility of reference checks away from controllers and into the underlying managers & drivers, which can handle the task with equal or greater efficiency. - Tenant references from create_user/update_user are NOT tested due to inconsistencies between backends - Additional test coverage improvements Also fixes bug 999209, bug 999608, bug 1006029, bug 1006055, bug 1006287, bug 1006334, and bug 1006344. Change-Id: I7de592e7dd4518038436b9a9fdaab559b00a0537 --- tests/test_keystoneclient_sql.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/test_keystoneclient_sql.py') diff --git a/tests/test_keystoneclient_sql.py b/tests/test_keystoneclient_sql.py index a70f7603..38a6cbfe 100644 --- a/tests/test_keystoneclient_sql.py +++ b/tests/test_keystoneclient_sql.py @@ -74,6 +74,17 @@ class KcMasterSqlTestCase(test_keystoneclient.KcMasterTestCase): self.assertRaises(client_exceptions.NotFound, client.endpoints.delete, id=endpoint.id) + def test_endpoint_create_404(self): + from keystoneclient import exceptions as client_exceptions + client = self.get_client(admin=True) + self.assertRaises(client_exceptions.NotFound, + client.endpoints.create, + region=uuid.uuid4().hex, + service_id=uuid.uuid4().hex, + publicurl=uuid.uuid4().hex, + adminurl=uuid.uuid4().hex, + internalurl=uuid.uuid4().hex) + def test_endpoint_delete_404(self): from keystoneclient import exceptions as client_exceptions client = self.get_client(admin=True) -- cgit