From 193374af3860e17ed03bb0431d823046079ae444 Mon Sep 17 00:00:00 2001 From: Jay Pipes Date: Tue, 13 Mar 2012 17:30:07 -0400 Subject: Fixes LP #954089 - Service list templated catalog * Adds missing test cases for the TemplatedCatalog * Adds a base CatalogTest that different backends can use * Updates kvs.Catalog to raise ServiceNotFound where appropriate * Updates the tests.test_keystoneclient_sql to actually test the SQL catalog backend * Removes old test for incorrect endpoints listing * Removes the keystone.catalog.core.Driver.service_exists method since it was only implemented in the SQL driver and wasn't required now that get_service and delete_service properly raise ServiceNotFound exception. Change-Id: I35690cc147e56007be27bacf94eeff360e727e5d --- tests/test_backend_kvs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/test_backend_kvs.py') diff --git a/tests/test_backend_kvs.py b/tests/test_backend_kvs.py index 0f24c429..6dc626e5 100644 --- a/tests/test_backend_kvs.py +++ b/tests/test_backend_kvs.py @@ -35,13 +35,14 @@ class KvsToken(test.TestCase, test_backend.TokenTests): self.token_api = token_kvs.Token(db={}) -class KvsCatalog(test.TestCase): +class KvsCatalog(test.TestCase, test_backend.CatalogTests): def setUp(self): super(KvsCatalog, self).setUp() self.catalog_api = catalog_kvs.Catalog(db={}) - self._load_fixtures() + self.load_fixtures(default_fixtures) + self._load_fake_catalog() - def _load_fixtures(self): + def _load_fake_catalog(self): self.catalog_foobar = self.catalog_api._create_catalog( 'foo', 'bar', {'RegionFoo': {'service_bar': {'foo': 'bar'}}}) -- cgit