webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
mox.MockAnything Class Reference
Inheritance diagram for mox.MockAnything:
mox.MockObject

Public Member Functions

def __init__ (self)
 
def __getattr__ (self, method_name)
 
def __nonzero__ (self)
 
def __eq__ (self, rhs)
 
def __ne__ (self, rhs)
 

Detailed Description

A mock that can be used to mock anything.

This is helpful for mocking classes that do not provide a public interface.

Constructor & Destructor Documentation

◆ __init__()

def mox.MockAnything.__init__ (   self)
 

Member Function Documentation

◆ __eq__()

def mox.MockAnything.__eq__ (   self,
  rhs 
)
Provide custom logic to compare objects.

◆ __getattr__()

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).

◆ __ne__()

def mox.MockAnything.__ne__ (   self,
  rhs 
)
Provide custom logic to compare objects.

◆ __nonzero__()

def mox.MockAnything.__nonzero__ (   self)
Return 1 for nonzero so the mock can be used as a conditional.

The documentation for this class was generated from the following file: