telemetry.testing.simple_mock | index telemetry/testing/simple_mock.py

`A very very simple mock object harness.`

Classes
`` |  |

__builtin__.object
  MockFunctionCall
  MockObject
  MockTimer
  MockTrace

class MockFunctionCall(__builtin__.object)
`` |  | Methods defined here:

VerifyEquals(self, got)

WhenCalled(self, handler)

WillReturn(self, value)

WithArgs(self, *args)

__init__(self, name)

__repr__(self)

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class MockObject(__builtin__.object)
`` |  | Methods defined here:

ExpectCall(self, func_name, *args)

SetAttribute(self, name, value)

__init__(self, parent_mock=None)

__setattr__(self, name, value)

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class MockTimer(__builtin__.object)
`` | `A mock timer to fake out the timing for a module. Args: module: module to fake out the time`
| Methods defined here:

Restore(self)

SetTime(self, time)

__del__(self)

__init__(self, module=None)

sleep(self, time)

time(self)

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

class MockTrace(__builtin__.object)
`` |  | Methods defined here:

__init__(self)

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Data
`` |  | DONT_CARE = ''