Commit 517fc5e6 authored by Julien Muchembled's avatar Julien Muchembled

tests: fix boolean evaluation of Mock objects

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2744 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent c21ad524
......@@ -57,6 +57,7 @@ def mockDefaultValue(name, function):
method.__name__ = name
setattr(Mock, name, method)
mockDefaultValue('__nonzero__', lambda self: self.__len__() != 0)
mockDefaultValue('__repr__', lambda self:
'<%s object at 0x%x>' % (self.__class__.__name__, id(self)))
mockDefaultValue('__str__', repr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment