  def testGetProjectAncestry(self, _, mock_execute_request):
    """Validates the GetProjectAncestry function"""
    mock_execute_request.side_effect = [
        [gcp_mocks.MOCK_CLOUD_RESOURCE_PROJECT],
        [gcp_mocks.MOCK_CLOUD_RESOURCE_FOLDER],
        [gcp_mocks.MOCK_CLOUD_RESOURCE_ORGANIZATION]
    ]
    response = gcp_mocks.FAKE_CLOUD_RESOURCE_MANAGER.ProjectAncestry()
    self.assertListEqual(response,
        [
          {
            'createTime': '2020-01-01T00:00:00.000Z',
            'displayName': 'fake-project',
            'etag': 'Tm90IGFuIGV0YWd4eHh4eA==',
            'name': 'projects/000000000000',
            'parent': 'folders/111111111111',
            'projectId': 'fake-project',
            'state': 'ACTIVE', 'updateTime': '2020-01-01T00:00:00.000Z'
          },
          {
            'createTime': '2020-01-01T00:00:00.000Z',
            'displayName': 'fake-folder',
            'etag': 'Tm90IGFuIGV0YWd4eHh4eA==',
            'name': 'folders/111111111111',
            'parent': 'organizations/222222222222',
            'state': 'ACTIVE',
            'updateTime': '2020-01-01T00:00:00.000Z'
          },
          {
            'createTime': '2020-01-01T00:00:00.000Z',
            'directoryCustomerId': 'bm9jdXN0',
            'displayName': 'fake-organization.com',
            'etag': 'Tm90IGFuIGV0YWd4eHh4eA==',
            'name': 'organizations/222222222222',
            'state': 'ACTIVE',
            'updateTime': '2020-01-01T00:00:00.000Z'
          }
        ])
Validates the GetProjectAncestry function
tests/providers/gcp/internal/test_cloudresourcemanager.py