Package gofer :: Package rmi :: Module mock :: Class Factory
[hide private]
[frames] | no frames]

Class Factory

source code

Stub factory

Class Methods [hide private]
 
register(cls, **mocks)
Register an mock to be used instead of creating a real stub.
source code
 
purge(cls)
purge registered mocks.
source code
Stub
stub(cls, name)
Get a (mock) stub by name.
source code
Class Variables [hide private]
dict mocks = {}
The registered stubs.
Method Details [hide private]

stub(cls, name)
Class Method

source code 

Get a (mock) stub by name.

Parameters:
  • name (str) - The stub class (or module) name.
Returns: Stub
A stub instance.