test_user_models.py 文件源码

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

项目:correios 作者: olist 项目源码 文件源码
def test_sanitize_posting_card_data(contract):
    posting_card = PostingCard(
        contract=contract,
        number="0056789123",
        administrative_code=8888888,
    )
    posting_card.start_date = "2014-05-09 00:00:00-03:00"
    posting_card.end_date = "2018-05-16 00:00:00-03:00"
    posting_card.status = "01"
    posting_card.status_code = "I"
    posting_card.unit = "08        "

    assert posting_card.number == "0056789123"
    assert posting_card.administrative_code == "08888888"
    assert posting_card.start_date == datetime(2014, 5, 9, 0, 0, tzinfo=timezone(timedelta(hours=-3)))
    assert posting_card.end_date == datetime(2018, 5, 16, 0, 0, tzinfo=timezone(timedelta(hours=-3)))
    assert posting_card.status == 1
    assert posting_card.status_code == "I"
    assert posting_card.unit == 8
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号