Package guiunittest :: Module mocks
[show private | hide private]
[frames | no frames]

Module guiunittest.mocks

Function Summary
  install(obj, *mocks, **funcs)
Replace the functions in the given obj (module, class, whatever) for mock attributes, useful for testing purposes.
  uninstall(obj)
Retore the mock functions installed by install.

Function Details

install(obj, *mocks, **funcs)

Replace the functions in the given obj (module, class, whatever) for mock attributes, useful for testing purposes.
Parameters:
mocks - mock objects to insert in the given object. The target name of the attribute/method will be the equal to the __name__ attribute of each mock.
funcs - mock objects to insert in the object, but with the name given by the keyword parameter.

uninstall(obj)

Retore the mock functions installed by install.

Generated by Epydoc 2.1 on Wed Nov 24 14:15:09 2004 http://epydoc.sf.net