fix tests
This commit is contained in:
parent
aaf7695518
commit
3dac7734c6
|
@ -133,7 +133,7 @@ class IdentityController(BaseApplication):
|
|||
return self.identity_api.get_user(context, user_id=user_id)
|
||||
|
||||
def create_user(self, context, **kw):
|
||||
user_id = kw.get('id', uuid.uuid4().hex)
|
||||
user_id = kw.get('id') and kw.get('id') or uuid.uuid4().hex
|
||||
kw['id'] = user_id
|
||||
return self.identity_api.create_user(context, user_id=user_id, data=kw)
|
||||
|
||||
|
@ -153,7 +153,7 @@ class IdentityController(BaseApplication):
|
|||
context, tenant_name=tenant_name)
|
||||
|
||||
def create_tenant(self, context, **kw):
|
||||
tenant_id = kw.get('id', uuid.uuid4().hex)
|
||||
tenant_id = kw.get('id') and kw.get('id') or uuid.uuid4().hex
|
||||
kw['id'] = tenant_id
|
||||
return self.identity_api.create_tenant(
|
||||
context, tenant_id=tenant_id, data=kw)
|
||||
|
|
|
@ -53,7 +53,7 @@ class KvsIdentity(test.TestCase):
|
|||
password=self.user_foo['password'])
|
||||
self.assertDictEquals(user_ref, self.user_foo)
|
||||
self.assert_(tenant_ref is None)
|
||||
self.assert_(extras_ref is None)
|
||||
self.assert_(not extras_ref)
|
||||
|
||||
def test_authenticate(self):
|
||||
user_ref, tenant_ref, extras_ref = self.identity_api.authenticate(
|
||||
|
|
|
@ -65,7 +65,7 @@ class IdentityApi(test.TestCase):
|
|||
data = json.loads(resp.body)
|
||||
self.assertEquals(self.user_foo['id'], data['user']['id'])
|
||||
self.assertEquals(None, data['tenant'])
|
||||
self.assertEquals(None, data['extras'])
|
||||
self.assertEquals({}, data['extras'])
|
||||
|
||||
def test_get_tenants(self):
|
||||
token = self._login()
|
||||
|
|
|
@ -70,7 +70,7 @@ class NovaClientCompatMasterTestCase(CompatTestCase):
|
|||
# NOTE(termie): novaclient seems to care about the region more than
|
||||
# keystoneclient
|
||||
conn = base_client.HTTPClient(auth_url="http://localhost:%s/v2.0/" % port,
|
||||
user='foo',
|
||||
user='FOO',
|
||||
apikey='foo',
|
||||
projectid='BAR',
|
||||
region_name='RegionOne')
|
||||
|
|
Loading…
Reference in New Issue