#NEWLINE# def mock_availability_return_value( self , is_available , reason = '' ) : #NEWLINE# #INDENT# policy = self . line . purchase_info . availability #NEWLINE# policy . is_purchase_permitted = mock . MagicMock ( return_value = ( policy , reason ) )