Hello,
i would like use a mock object for testing one class and its methods:
Here my class :
class Foo(Component):
def __init__(self):
self._db = self.env.get_db()
def foomethod(self, arg):
.....
But i don't know how to mock the class Component. Note that Component
provide the attribut env.
I use
Pyhton mock module (author Dave Kirby's ) or
mock (author Michael Foord (fuzzyman)) but if you have a generic
solution i will adapt it to my problem.
Thanks by advance and sorry for my poor english.
--
http://mail.python.org/mailman/listinfo/python-list