コード例 #1
0
def test_datecolumn_defaults_to_DATE_FORMAT():
    date = datetime.date(2010, 1, 1)
    cell = Fake().has_attr(value=date)
    column = DateColumn()
    assert column.render(cell) == "2010-01-01"
コード例 #2
0
def test_datecolumn_formats_dates():
    date = datetime.date(2010, 1, 1)
    cell = Fake().has_attr(value=date)
    column = DateColumn(format="D d M Y")
    assert column.render(cell) == "Fri 01 Jan 2010"