webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | List of all members
mox.StrContains Class Reference
Inheritance diagram for mox.StrContains:
mox.Comparator

Public Member Functions

def __init__ (self, search_string)
 
def equals (self, rhs)
 
def __repr__ (self)
 
- Public Member Functions inherited from mox.Comparator
def equals (self, rhs)
 
def __eq__ (self, rhs)
 
def __ne__ (self, rhs)
 

Detailed Description

Comparison class used to check whether a substring exists in a
string parameter.  This can be useful in mocking a database with SQL
passed in as a string parameter, for example.

Example:
mock_dao.RunQuery(StrContains('IN (1, 2, 4, 5)')).AndReturn(mock_result)

Constructor & Destructor Documentation

◆ __init__()

def mox.StrContains.__init__ (   self,
  search_string 
)
Initialize.

Args:
  # search_string: the string you are searching for
  search_string: str

Member Function Documentation

◆ __repr__()

def mox.StrContains.__repr__ (   self)

◆ equals()

def mox.StrContains.equals (   self,
  rhs 
)
Check to see if the search_string is contained in the rhs string.

Args:
  # rhs: the right hand side of the test
  rhs: object

Returns:
  bool

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