summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-03-23 14:11:41 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-03-23 14:11:41 +0000
commit985e4c8dfe9d79ffc33af6dc64973c20c01f7485 (patch)
tree3027a08e867a608445286a6dbab650f64b629069
parentd18501b0edb990d29562c029337c225fb79b3b49 (diff)
Fixed #13171 -- Corrected the field_subclassing unit test. Thanks to Gabriel Hurley for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/modeltests/field_subclassing/fields.py4
-rw-r--r--tests/modeltests/field_subclassing/models.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/modeltests/field_subclassing/fields.py b/tests/modeltests/field_subclassing/fields.py
index d545b1968d..a43714dcf5 100644
--- a/tests/modeltests/field_subclassing/fields.py
+++ b/tests/modeltests/field_subclassing/fields.py
@@ -41,14 +41,14 @@ class SmallField(models.Field):
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):
diff --git a/tests/modeltests/field_subclassing/models.py b/tests/modeltests/field_subclassing/models.py
index 93b30c2ec2..a9fe88fe77 100644
--- a/tests/modeltests/field_subclassing/models.py
+++ b/tests/modeltests/field_subclassing/models.py
@@ -51,7 +51,7 @@ True
>>> 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())