def test_clean_optional_fields_empty(): """Verify clean returns None if the values are not required and not set.""" field = DateInputField(required=False) field.require_all_fields = False value = field.clean(["", "", ""]) assert value is None
def test_compress_optional_fields_empty(): """Verify compress returns None if the values are not required and not set.""" field = DateInputField() field.require_all_fields = False value = field.compress(["", "", ""]) assert value is None