File tree Expand file tree Collapse file tree
test/integration/models/iam Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,27 +66,27 @@ def test_get_account_permissions(test_linode_client):
6666
6767 account_permissions = client .iam .account_permissions_get (username )
6868
69- if len (account_permissions ) > 0 :
70- assert len (account_permissions ) > 0
71- else :
69+ if not account_permissions :
7270 pytest .skip ("No account permissions found for the user." )
71+ else :
72+ assert len (account_permissions ) > 0
7373
7474
7575def test_get_entity_permissions (test_linode_client ):
7676 client = test_linode_client
7777 username = client .profile ().username
7878
7979 entities = client .iam .entities ()
80- if len (entities ) > 0 :
80+ if not entities :
81+ pytest .skip ("no entities" )
82+ else :
8183 entity = entities [0 ]
8284 entity_permissions = client .iam .entity_permissions_get (
8385 username , entity .type , entity .id
8486 )
85- if len (entity_permissions ) > 0 :
86- assert len (entity_permissions ) > 0
87- else :
87+ if not entity_permissions :
8888 pytest .skip (
89- "No entity permissions found for the user and chosen entity."
89+ "no entity permissions found for the user and chosen entity."
9090 )
91- else :
92- pytest . skip ( "No entities found in IAM response." )
91+ else :
92+ assert len ( entity_permissions ) > 0
You can’t perform that action at this time.
0 commit comments