estebistec / drf-compound-fields

Django-REST-framework serializer fields for compound types.
BSD 3-Clause "New" or "Revised" License
92 stars 12 forks source link

Fix list validation #6

Closed mwarkentin closed 10 years ago

mwarkentin commented 10 years ago
mwarkentin commented 10 years ago

I'm not sure why this is triggering failures on python 3.x (haven't written any python 3 yet).

estebistec commented 10 years ago

You removed test_validate_non_list, which is an accurate test for this field, and the test you added should assert that is_valid is false. A ListField should NOT accept non-list values. If you truly want list-or-item behavior, see #5 (I'll probably get that added in the next couple of days).

estebistec commented 10 years ago

I just added a couple of tests in #7. Those are how I would characterize the expected behavior.

mwarkentin commented 10 years ago

Closing as this will be taken care of in #7.