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 <URL:http://cheeseshop.python.org/pypi/MiniMock>. You don't need to specify what interface the mock object has. Its Mock objects will allow *any* attribute access, method or otherwise, and simply report what was done. You can then check that report to see if it matches what you expect; the author suggests that the existing standard-library 'doctest' module is ideal for such checking. -- \ “It is the mark of an educated mind to be able to entertain a | `\ thought without accepting it.” —Aristotle | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list