import_reqs_tests.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:omb-eregs 作者: 18F 项目源码 文件源码
def policy_row_factory(**kwargs):
    """Generate random data in a policy-row format"""
    row = {
        'policyNumber': str(random.randint(100, 999)),                 # nosec
        'policyTitle': get_random_string(32),
        'uriPolicyId': 'http://example.com/' + get_random_string(10),
        'ombPolicyId': get_random_string(32),
        'policyType': random.choice([t.value for t in PolicyTypes]),   # nosec
        'policyIssuanceYear': date(
            random.randint(1950, 2016),                             # nosec
            random.randint(1, 12),                                  # nosec
            random.randint(1, 28)).strftime('%m/%d/%Y'),            # nosec
        'policySunset': 'NA',
        'issuingBody': get_random_string(10)
    }
    row.update(kwargs)
    return row
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号