Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #13171 -- Corrected the field_subclassing unit test. Thanks to …

…Gabriel Hurley for the report and patch.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent d18501b commit 985e4c8dfe9d79ffc33af6dc64973c20c01f7485 @freakboy3742 freakboy3742 committed
4 tests/modeltests/field_subclassing/
@@ -41,14 +41,14 @@ def to_python(self, value):
def get_db_prep_save(self, value):
return unicode(value)
- def get_db_prep_lookup(self, lookup_type, value):
+ def get_prep_lookup(self, lookup_type, value):
if lookup_type == 'exact':
return force_unicode(value)
if lookup_type == 'in':
return [force_unicode(v) for v in value]
if lookup_type == 'isnull':
return []
- raise FieldError('Invalid lookup type: %r' % lookup_type)
+ raise TypeError('Invalid lookup type: %r' % lookup_type)
class JSONField(models.TextField):
2  tests/modeltests/field_subclassing/
@@ -51,7 +51,7 @@ class DataModel(models.Model):
>>> MyModel.objects.filter(data__lt=s)
Traceback (most recent call last):
-FieldError: Invalid lookup type: 'lt'
+TypeError: Invalid lookup type: 'lt'
# Serialization works, too.
>>> stream = serializers.serialize("json", MyModel.objects.all())

0 comments on commit 985e4c8

Please sign in to comment.
Something went wrong with that request. Please try again.