Public Member Functions | |
def | __eq__ (self, rhs) |
def | __eq__ (self, rhs) |
def | __getattr__ (self, method_name) |
def | __getattr__ (self, method_name) |
def | __init__ (self) |
def | __init__ (self) |
def | __ne__ (self, rhs) |
def | __ne__ (self, rhs) |
def | __nonzero__ (self) |
def | __nonzero__ (self) |
Private Member Functions | |
def | _CreateMockMethod (self, method_name) |
def | _CreateMockMethod (self, method_name) |
def | _Replay (self) |
def | _Replay (self) |
def | _Reset (self) |
def | _Reset (self) |
def | _Verify (self) |
def | _Verify (self) |
Private Attributes | |
_expected_calls_queue | |
_replay_mode | |
A mock that can be used to mock anything. This is helpful for mocking classes that do not provide a public interface.
Definition at line 268 of file bloaty/third_party/protobuf/python/mox.py.
def mox.MockAnything.__init__ | ( | self | ) |
Definition at line 274 of file bloaty/third_party/protobuf/python/mox.py.
def mox.MockAnything.__init__ | ( | self | ) |
Definition at line 274 of file protobuf/python/mox.py.
def mox.MockAnything.__eq__ | ( | self, | |
rhs | |||
) |
Provide custom logic to compare objects.
Reimplemented in mox.MockObject, and mox.MockObject.
Definition at line 314 of file bloaty/third_party/protobuf/python/mox.py.
def mox.MockAnything.__eq__ | ( | self, | |
rhs | |||
) |
Provide custom logic to compare objects.
Reimplemented in mox.MockObject, and mox.MockObject.
Definition at line 314 of file protobuf/python/mox.py.
def mox.MockAnything.__getattr__ | ( | self, | |
method_name | |||
) |
Intercept method calls on this object. A new MockMethod is returned that is aware of the MockAnything's state (record or replay). The call will be recorded or replayed by the MockMethod's __call__. Args: # method name: the name of the method being called. method_name: str Returns: A new MockMethod aware of MockAnything's state (record or replay).
Reimplemented in mox.MockObject, and mox.MockObject.
Definition at line 278 of file bloaty/third_party/protobuf/python/mox.py.
def mox.MockAnything.__getattr__ | ( | self, | |
method_name | |||
) |
Intercept method calls on this object. A new MockMethod is returned that is aware of the MockAnything's state (record or replay). The call will be recorded or replayed by the MockMethod's __call__. Args: # method name: the name of the method being called. method_name: str Returns: A new MockMethod aware of MockAnything's state (record or replay).
Reimplemented in mox.MockObject, and mox.MockObject.
Definition at line 278 of file protobuf/python/mox.py.
def mox.MockAnything.__ne__ | ( | self, | |
rhs | |||
) |
Provide custom logic to compare objects.
Definition at line 321 of file bloaty/third_party/protobuf/python/mox.py.
def mox.MockAnything.__ne__ | ( | self, | |
rhs | |||
) |
Provide custom logic to compare objects.
Definition at line 321 of file protobuf/python/mox.py.
def mox.MockAnything.__nonzero__ | ( | self | ) |
Return 1 for nonzero so the mock can be used as a conditional.
Definition at line 309 of file protobuf/python/mox.py.
def mox.MockAnything.__nonzero__ | ( | self | ) |
Return 1 for nonzero so the mock can be used as a conditional.
Definition at line 309 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Create a new mock method call and return it. Args: # method name: the name of the method being called. method_name: str Returns: A new MockMethod aware of MockAnything's state (record or replay).
Definition at line 295 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Create a new mock method call and return it. Args: # method name: the name of the method being called. method_name: str Returns: A new MockMethod aware of MockAnything's state (record or replay).
Definition at line 295 of file protobuf/python/mox.py.
|
private |
Start replaying expected method calls.
Definition at line 326 of file protobuf/python/mox.py.
|
private |
Start replaying expected method calls.
Definition at line 326 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Reset the state of this mock to record mode with an empty queue.
Definition at line 349 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Reset the state of this mock to record mode with an empty queue.
Definition at line 349 of file protobuf/python/mox.py.
|
private |
Verify that all of the expected calls have been made. Raises: ExpectedMethodCallsError: if there are still more method calls in the expected queue.
Definition at line 331 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Verify that all of the expected calls have been made. Raises: ExpectedMethodCallsError: if there are still more method calls in the expected queue.
Definition at line 331 of file protobuf/python/mox.py.
|
private |
Definition at line 319 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Definition at line 318 of file bloaty/third_party/protobuf/python/mox.py.