# Path: n_utils/cloudfront_utils.py
# def distributions():
#     pages = boto3.client("cloudfront").get_paginator('list_distributions')
#     print(pages.paginate())
#     for page in pages.paginate():
#         print(page)
#         distribution_list = page.get('DistributionList')
#         for distribution in distribution_list['Items']:
#             yield distribution['Id']
# 
# def distribution_comments():
#     pages = boto3.client("cloudfront").get_paginator('list_distributions')
#     for page in pages.paginate():
#         distribution_list = page.get('DistributionList')
#         for distribution in distribution_list['Items']:
#             yield distribution['Comment']


from datetime import datetime
from n_utils.cloudfront_utils import distributions, distribution_comments
    'DistributionList': {
        'Marker': 'string',
        'NextMarker': 'string',
        'MaxItems': 123,
        'IsTruncated': False,
        'Quantity': 123,
        'Items': [
            {
                'Id': 'id1',
                'ARN': 'arn1',
                'Status': 'status1',
                'LastModifiedTime': datetime(2015, 1, 1),
                'DomainName': 'string',
                'Comment': 'comment1',
            },
            {
                'Id': 'id2',
                'ARN': 'arn2',
                'Status': 'status2',
                'LastModifiedTime': datetime(2016, 1, 1),
                'DomainName': 'string',
                'Comment': 'comment2',
            }
        ]
    }
}


def test_distributions(mocker, paginator):
    paginator.paginate.return_value = [DISTRIBUTION]

# Path: n_utils/cloudfront_utils.py
# def distributions():
#     pages = boto3.client("cloudfront").get_paginator('list_distributions')
#     print(pages.paginate())
#     for page in pages.paginate():
#         print(page)
#         distribution_list = page.get('DistributionList')
#         for distribution in distribution_list['Items']:
#             yield distribution['Id']
# 
# def distribution_comments():
#     pages = boto3.client("cloudfront").get_paginator('list_distributions')
#     for page in pages.paginate():
#         distribution_list = page.get('DistributionList')
#         for distribution in distribution_list['Items']:
#             yield distribution['Comment']


# Path: n_utils/tests/cloudfront_utils_test.py
from datetime import datetime
from n_utils.cloudfront_utils import distributions, distribution_comments

    'DistributionList': {
        'Marker': 'string',
        'NextMarker': 'string',
        'MaxItems': 123,
        'IsTruncated': False,
        'Quantity': 123,
        'Items': [
            {
                'Id': 'id1',
                'ARN': 'arn1',
                'Status': 'status1',
                'LastModifiedTime': datetime(2015, 1, 1),
                'DomainName': 'string',
                'Comment': 'comment1',
            },
            {
                'Id': 'id2',
                'ARN': 'arn2',
                'Status': 'status2',
                'LastModifiedTime': datetime(2016, 1, 1),
                'DomainName': 'string',
                'Comment': 'comment2',
            }
        ]
    }
}


def test_distributions(mocker, paginator):
    paginator.paginate.return_value = [DISTRIBUTION]

    assert list(distributions()) == ['id1', 'id2']