Ejemplo n.º 1
0
def test_created_setter_bad_string_data():
    obj = PackMetaData(PACK_METADATA)
    original_created_date = obj.created

    obj.created = 'Obviously not a date'

    assert obj.created == original_created_date
Ejemplo n.º 2
0
def test_created_setter_datetime():
    obj = PackMetaData(PACK_METADATA)

    new_date_time = datetime(2020, 12, 31, 23, 59, 59)

    obj.created = new_date_time

    assert obj.created == new_date_time