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

Class MockContainer

source code

object --+
         |
        MockContainer

The (mock) stub container

Nested Classes [hide private]
  __metaclass__
Mock container singleton by uuid only.
Instance Methods [hide private]
 
__init__(self, uuid, producer=None, **options)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
MockStub
__getattr__(self, name)
Get a stub by name.
source code
MockStub
__getitem__(self, name)
Get a stub by name.
source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
repr(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Instance Variables [hide private]
str __id
The peer ID.
Options __options
Container options.
dict __stubs
A cache of stubs.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, uuid, producer=None, **options)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
Overrides: object.__init__

__getattr__(self, name)
(Qualification operator)

source code 

Get a stub by name.

Parameters:
  • name (str) - The name of a stub class.
Returns: MockStub
A stub object.

__getitem__(self, name)
(Indexing operator)

source code 

Get a stub by name.

Parameters:
  • name (str) - The name of a stub class.
Returns: MockStub
A stub object.

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)