Merge "Make logic of unit tests responsive to the method names"
This commit is contained in:
commit
e0e85197dd
@ -664,18 +664,18 @@ class TestAuthorize(BaseTestAuthorize):
|
|||||||
identity = self._get_identity()
|
identity = self._get_identity()
|
||||||
user_name = identity['HTTP_X_USER_NAME']
|
user_name = identity['HTTP_X_USER_NAME']
|
||||||
user_id = identity['HTTP_X_USER_ID']
|
user_id = identity['HTTP_X_USER_ID']
|
||||||
tenant_id = identity['HTTP_X_TENANT_ID']
|
tenant_name = identity['HTTP_X_TENANT_NAME']
|
||||||
for user in [user_id, user_name, '*']:
|
for user in [user_id, user_name, '*']:
|
||||||
acl = '%s:%s' % (tenant_id, user)
|
acl = '%s:%s' % (tenant_name, user)
|
||||||
self._check_authenticate(identity=identity, acl=acl)
|
self._check_authenticate(identity=identity, acl=acl)
|
||||||
|
|
||||||
def test_authorize_succeeds_for_tenant_id_user_in_roles(self):
|
def test_authorize_succeeds_for_tenant_id_user_in_roles(self):
|
||||||
identity = self._get_identity()
|
identity = self._get_identity()
|
||||||
user_name = identity['HTTP_X_USER_NAME']
|
user_name = identity['HTTP_X_USER_NAME']
|
||||||
user_id = identity['HTTP_X_USER_ID']
|
user_id = identity['HTTP_X_USER_ID']
|
||||||
tenant_name = identity['HTTP_X_TENANT_NAME']
|
tenant_id = identity['HTTP_X_TENANT_ID']
|
||||||
for user in [user_id, user_name, '*']:
|
for user in [user_id, user_name, '*']:
|
||||||
acl = '%s:%s' % (tenant_name, user)
|
acl = '%s:%s' % (tenant_id, user)
|
||||||
self._check_authenticate(identity=identity, acl=acl)
|
self._check_authenticate(identity=identity, acl=acl)
|
||||||
|
|
||||||
def test_authorize_succeeds_for_wildcard_tenant_user_in_roles(self):
|
def test_authorize_succeeds_for_wildcard_tenant_user_in_roles(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user