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
评论列表
文章目录