test(api): if model lacks organization field, xfail returned orgs test cases for Functional API perms test suite
ref: #833 #820
This commit is contained in:
@ -334,6 +334,9 @@ class APIPermissionViewInheritedCases:
|
||||
|
||||
for item in response.data['results']:
|
||||
|
||||
if 'organization' not in item:
|
||||
pytest.xfail( reason = 'Model lacks organization field. test is n/a' )
|
||||
|
||||
if(
|
||||
int(item['organization']['id']) not in viewable_organizations
|
||||
and
|
||||
@ -387,6 +390,9 @@ class APIPermissionViewInheritedCases:
|
||||
|
||||
for row in response.data['results']:
|
||||
|
||||
if 'organization' not in row:
|
||||
pytest.xfail( reason = 'Model lacks organization field. test is n/a' )
|
||||
|
||||
if row['organization']['id'] not in viewable_organizations:
|
||||
|
||||
only_from_user_org = False
|
||||
|
Reference in New Issue
Block a user