  def testSetOrgPolicy(self, mock_grm_api):
    """Validates the SetOrgPolicy function"""
    api_set_org_policy = mock_grm_api.return_value.projects.return_value.setOrgPolicy
    api_set_org_policy.return_value.execute.return_value = gcp_mocks.MOCK_ORG_POLICY
    gcp_mocks.FAKE_CLOUD_RESOURCE_MANAGER.SetOrgPolicy(
        'projects/000000000000',
        {
            'constraint': 'constraints/compute.storageResourceUseRestrictions',
            'listPolicy': {
                'inheritFromParent': False, 'allValues': 'ALLOW'
            }
        },
        'abc123')
    api_set_org_policy.assert_called_with(
        resource='projects/000000000000',
        body={
          'policy': {
            'constraint': 'constraints/compute.storageResourceUseRestrictions',
            'listPolicy': {
                'inheritFromParent': False, 'allValues': 'ALLOW'
            },
            'etag': 'abc123'
          }
        })
Validates the SetOrgPolicy function
tests/providers/gcp/internal/test_cloudresourcemanager.py