'Field names that do not map to a model field or relationship should
raise a configuration errror.'

def test_invalid_field(self):

    class TestSerializer(serializers.ModelSerializer, ):
        class Meta:
            model = RegularFieldsModel
            fields = (u'auto_field', u'invalid')
    with self.assertRaises(ImproperlyConfigured) as excinfo:
        TestSerializer().fields
    expected = u'Field    name    `invalid`    is    not    valid    for    model    `RegularFieldsModel`.'
    assert (str(excinfo.exception) == expected)
