Public Member Functions | Private Attributes | List of all members
mox.MultipleTimesGroup Class Reference
Inheritance diagram for mox.MultipleTimesGroup:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, group_name)
 
def __init__ (self, group_name)
 
def AddMethod (self, mock_method)
 
def AddMethod (self, mock_method)
 
def IsSatisfied (self)
 
def IsSatisfied (self)
 
def MethodCalled (self, mock_method)
 
def MethodCalled (self, mock_method)
 
- Public Member Functions inherited from mox.MethodGroup
def __str__ (self)
 
def __str__ (self)
 
def group_name (self)
 
def group_name (self)
 

Private Attributes

 _methods
 
 _methods_called
 

Detailed Description

MultipleTimesGroup holds methods that may be called any number of times.

Note: Each method must be called at least once.

This is helpful, if you don't know or care how many times a method is called.

Definition at line 1263 of file bloaty/third_party/protobuf/python/mox.py.

Constructor & Destructor Documentation

◆ __init__() [1/2]

def mox.MultipleTimesGroup.__init__ (   self,
  group_name 
)

Reimplemented from mox.MethodGroup.

Definition at line 1271 of file bloaty/third_party/protobuf/python/mox.py.

◆ __init__() [2/2]

def mox.MultipleTimesGroup.__init__ (   self,
  group_name 
)

Reimplemented from mox.MethodGroup.

Definition at line 1271 of file protobuf/python/mox.py.

Member Function Documentation

◆ AddMethod() [1/2]

def mox.MultipleTimesGroup.AddMethod (   self,
  mock_method 
)
Add a method to this group.

Args:
  mock_method: A mock method to be added to this group.

Reimplemented from mox.MethodGroup.

Definition at line 1276 of file bloaty/third_party/protobuf/python/mox.py.

◆ AddMethod() [2/2]

def mox.MultipleTimesGroup.AddMethod (   self,
  mock_method 
)
Add a method to this group.

Args:
  mock_method: A mock method to be added to this group.

Reimplemented from mox.MethodGroup.

Definition at line 1276 of file protobuf/python/mox.py.

◆ IsSatisfied() [1/2]

def mox.MultipleTimesGroup.IsSatisfied (   self)
Return True if all methods in this group are called at least once.

Reimplemented from mox.MethodGroup.

Definition at line 1318 of file protobuf/python/mox.py.

◆ IsSatisfied() [2/2]

def mox.MultipleTimesGroup.IsSatisfied (   self)
Return True if all methods in this group are called at least once.

Reimplemented from mox.MethodGroup.

Definition at line 1318 of file bloaty/third_party/protobuf/python/mox.py.

◆ MethodCalled() [1/2]

def mox.MultipleTimesGroup.MethodCalled (   self,
  mock_method 
)
Remove a method call from the group.

If the method is not in the set, an UnexpectedMethodCallError will be
raised.

Args:
  mock_method: a mock method that should be equal to a method in the group.

Returns:
  The mock method from the group

Raises:
  UnexpectedMethodCallError if the mock_method was not in the group.

Reimplemented from mox.MethodGroup.

Definition at line 1285 of file bloaty/third_party/protobuf/python/mox.py.

◆ MethodCalled() [2/2]

def mox.MultipleTimesGroup.MethodCalled (   self,
  mock_method 
)
Remove a method call from the group.

If the method is not in the set, an UnexpectedMethodCallError will be
raised.

Args:
  mock_method: a mock method that should be equal to a method in the group.

Returns:
  The mock method from the group

Raises:
  UnexpectedMethodCallError if the mock_method was not in the group.

Reimplemented from mox.MethodGroup.

Definition at line 1285 of file protobuf/python/mox.py.

Member Data Documentation

◆ _methods

mox.MultipleTimesGroup._methods
private

Definition at line 1273 of file bloaty/third_party/protobuf/python/mox.py.

◆ _methods_called

mox.MultipleTimesGroup._methods_called
private

Definition at line 1274 of file bloaty/third_party/protobuf/python/mox.py.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:41