From: Mike Bayer Date: Sat, 12 Aug 2006 21:23:34 +0000 (+0000) Subject: fix to __eq__ method in a test object X-Git-Tag: rel_0_2_7~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2f00afe36206d8b73d9104ec0eeaa3a7c0447b8;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fix to __eq__ method in a test object --- diff --git a/test/orm/objectstore.py b/test/orm/objectstore.py index 19e5faccb8..191b6ff4a8 100644 --- a/test/orm/objectstore.py +++ b/test/orm/objectstore.py @@ -1081,7 +1081,7 @@ class SaveTest(SessionTest): def __init__(self, name): self.name = name def __eq__(self, other): - return other.name == self.name + return other.__class__ == Keyword and other.name == self.name def __repr__(self): return "Keyword(%s, %s)" % (getattr(self, 'keyword_id', 'None'), self.name)