summaryrefslogtreecommitdiff
path: root/tests/field_subclassing/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/field_subclassing/fields.py')
-rw-r--r--tests/field_subclassing/fields.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/field_subclassing/fields.py b/tests/field_subclassing/fields.py
index d96ce8d873..c2158824df 100644
--- a/tests/field_subclassing/fields.py
+++ b/tests/field_subclassing/fields.py
@@ -20,6 +20,11 @@ class Small(object):
def __str__(self):
return '%s%s' % (force_text(self.first), force_text(self.second))
+ def __eq__(self, other):
+ if isinstance(other, self.__class__):
+ return self.first == other.first and self.second == other.second
+ return False
+
class SmallField(six.with_metaclass(models.SubfieldBase, models.Field)):
"""