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:
2025-06-16 15:49:27 +09:30
parent ded80d4a8c
commit e3804b4f9b

View File

@ -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