def test_errors_non_list():
    """
    When a ListField is given a non-list value, then there should be one error related to the type
    mismatch.
    """
    field = ListField(child=DateField())
    try:
        field.to_internal_value('notAList')
        assert False, 'Expected ValidationError'
    except __HOLE__ as e:
        pass
dataset/ETHPy150Open estebistec/drf-compound-fields/tests/test_listfield.py/test_errors_non_list