def __setitem__ ( self , _ignored , return_value ) : self . mock . return_value = return_value self . mock . side_effect = None
python mock set constructor
Item assignment sets the return value and removes any side effect
def __setitem__(self, _ignored, return_value):
        """Item assignment sets the return value and removes any side effect"""
        self.mock.return_value = return_value
        self.mock.side_effect = None