Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[py3] Fixed dispatch tests

  • Loading branch information...
commit 60f5e1023066b92270d01aa121efe228f6edc379 1 parent 2719256
@claudep claudep authored
View
6 django/dispatch/saferef.py
@@ -149,9 +149,11 @@ def __str__(self):
self.selfName,
self.funcName,
)
-
+
__repr__ = __str__
-
+
+ __hash__ = object.__hash__
+
def __bool__( self ):
"""Whether we are still a valid reference"""
return self() is not None
View
2  tests/regressiontests/dispatch/tests/test_saferef.py
@@ -54,10 +54,8 @@ def testShortCircuit(self):
sd[s] = 1
for t in self.ts:
if hasattr(t, 'x'):
- self.assertTrue(sd.has_key(safeRef(t.x)))
self.assertTrue(safeRef(t.x) in sd)
else:
- self.assertTrue(sd.has_key(safeRef(t)))
self.assertTrue(safeRef(t) in sd)
def testRepresentation(self):
Please sign in to comment.
Something went wrong with that request. Please try again.