From 909770de2a317baf93f2f5a6710867a7f5c7b1fd Mon Sep 17 00:00:00 2001 From: termie Date: Wed, 28 Dec 2011 14:20:16 -0800 Subject: move novaclient tests over also --- tests/test_novaclient_compat.py | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/tests/test_novaclient_compat.py b/tests/test_novaclient_compat.py index 7b3b2767..1a441a4c 100644 --- a/tests/test_novaclient_compat.py +++ b/tests/test_novaclient_compat.py @@ -8,6 +8,8 @@ from keystonelight import models from keystonelight import test from keystonelight import utils +import default_fixtures + NOVACLIENT_REPO = 'git://github.com/openstack/python-novaclient.git' @@ -30,33 +32,10 @@ class NovaClientCompatMasterTestCase(CompatTestCase): self.app = self.loadapp('keystoneclient_compat_master') self.options = self.appconfig('keystoneclient_compat_master') - - self.identity_backend = utils.import_object( - self.options['identity_driver'], options=self.options) - self.token_backend = utils.import_object( - self.options['token_driver'], options=self.options) - self.catalog_backend = utils.import_object( - self.options['catalog_driver'], options=self.options) - + self.load_backends() + self.load_fixtures(default_fixtures) self.server = self.serveapp('keystoneclient_compat_master') - self.tenant_bar = self.identity_backend.create_tenant( - 'bar', - models.Tenant(id='bar', name='BAR')) - - self.user_foo = self.identity_backend.create_user( - 'foo', - models.User(id='foo', - name='FOO', - tenants=[self.tenant_bar['id']], - password='foo')) - - self.extras_bar_foo = self.identity_backend.create_extras( - self.user_foo['id'], self.tenant_bar['id'], - dict(roles=[], - roles_links=[])) - - def test_authenticate_and_tenants(self): from novaclient.keystone import client as ks_client from novaclient import client as base_client @@ -71,7 +50,7 @@ class NovaClientCompatMasterTestCase(CompatTestCase): # keystoneclient conn = base_client.HTTPClient(auth_url="http://localhost:%s/v2.0/" % port, user='FOO', - password='foo', + password='foo2', projectid='BAR', region_name='RegionOne') client = ks_client.Client(conn) -- cgit