Re: mock with inheritance

2008-07-09 Thread Ben Finney
lidiriel <[EMAIL PROTECTED]> writes: > But i don't know how to mock the class Component. Note that Component > provide the attribut env. I prefer to use the MiniMock framework http://cheeseshop.python.org/pypi/MiniMock>. You don't need to specify what interface the mock object has. Its Mock obje

mock with inheritance

2008-07-09 Thread lidiriel
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