def test_valid_range():
    valid_range = {
        "date": "2020-01/2020-12",
        "type": {"id": "other"}
    }
    assert valid_range == DateSchema().load(valid_range)
def test_minimal_date():
    # Note that none start or end are required. But it validates that at
    # least one of them is present.
    valid_minimal = {"date": "2020-12-31", "type": {"id": "other"}}
    assert valid_minimal == DateSchema().load(valid_minimal)