Initial imports and defines
----
    >>> from Products.CMFCore.utils import getToolByName
    >>> wftool = getToolByName(portal, "portal_workflow")
    >>> types = getToolByName(portal, 'portal_types')


Check PFGExtendedMailAdapter
----
    >>> adapter = types.getTypeInfo('PFGExtendedMailAdapter')
    >>> adapter.title
    'Extended Mail Adapter'
    >>> adapter.description
    'Extended Mail Adapter'
    >>> adapter.content_meta_type
    'PFGExtendedMailAdapter'
    >>> adapter.factory
    'addPFGExtendedMailAdapter'
    >>> adapter.immediate_view
    'base_view'
    >>> adapter.global_allow == False
    True
    >>> adapter.filter_content_types == False
    True
    >>> adapter.allowed_content_types
    ()
    >>> adapter.default_view
    'base_view'
    >>> 'base_view' in adapter.view_methods
    True

#    >>> adapter.getMethodAliases()
#    {'edit': 'base_edit', 'properties': 'base_metadata', 'sharing': 'folder_localrole_form', '(Default)': '(dynamic view)', 'view': '(selected layout)'}
#    >>> actions = adapter.listActions()
#    >>> for action in actions:
#    ...     (action.title, action.id, action.getActionExpression(), action.visible, action.permissions)
#    ('View', 'view', 'string:${object_url}/view', True, ('View',))
#    ('Edit', 'edit', 'string:${object_url}/edit', True, ('Modify portal content',))
#    ('Properties', 'metadata', 'string:${object_url}/properties', True, ('Modify portal content',))
#    ('References', 'references', 'string:${object_url}/reference_graph', True, ('Modify portal content', 'Review portal content'))

Creating PFGExtendedMailAdapter
----
    >>> from Products.PFGExtendedMailAdapter.content import PFGExtendedMailAdapter
    >>> adapter = PFGExtendedMailAdapter('adapter')
    >>> adapter
     <PFGExtendedMailAdapter at adapter>

#    >>> from Products.PloneFormGen.content.formMailerAdapter import FormMailerAdapter
#    >>> mailer = FormMailerAdapter('mailer')

#    >>> mailer.Schema().getSchemataNames()
#    ['default', 'categorization', 'dates', 'ownership', 'settings', 'addressing', 'message', 'template', 'encryption', 'overrides']
#    >>> adapter.Schema().getSchemataNames()
#    ['default', 'addressing', 'message', 'template', 'encryption', 'overrides', 'verkkomaksut', 'categorization', 'dates', 'ownership', 'settings']

#    >>> adapter.merchant_id = 111111
#    >>> adapter.getMerchant_id()
#    111111
#    >>> adapter.merchant_authentication_code = 'AIUEO'
#    >>> adapter.getMerchant_authentication_code()
#    'AIUEO'
#    >>> adapter.next_order_number = 10000
#    >>> adapter.getNext_order_number()
#    10000
#    >>> adapter.price_field = ('UID01', 'Title01')
#    >>> adapter.getPrice_field()
#    ('UID01', 'Title01')
#    >>> adapter.thanks_text = '<p>Thanks!!</p>'
#    >>> adapter.getThanks_text()
#    '<p>Thanks!!</p>'

    >>> adapter._at_rename_after_creation
    True

message schemata
====
    >>> adapter.Schema().getSchemataFields('message')
    [<Field msg_subject(string:rw)>, <Field subject_field(string:rw)>, <Field body_pre(text:rw)>, <Field body_post(text:rw)>, <Field body_footer(text:rw)>, <Field msg_attachments(lines:rw)>]

Field: msg_attachments
----
    >>> adapter.getField('msg_attachments')
    <Field msg_attachments(lines:rw)>
    >>> adapter.getField('msg_attachments').schemata
    'message'
    >>> adapter.getField('msg_attachments').required
    False
    >>> adapter.getField('msg_attachments').searchable
    False
    >>> adapter.getField('msg_attachments').storage
    <Storage AnnotationStorage>
    >>> adapter.getField('msg_attachments').vocabulary
    'attachments'
    >>> adapter.getField('msg_attachments').enforceVocabulary
    True
    >>> adapter.getField('msg_attachments').widget
    <Products.Archetypes.Widget.MultiSelectionWidget object at ...>
    >>> adapter.getField('msg_attachments').widget.label
    u'E-mail Attachments'
    >>> adapter.getField('msg_attachments').widget.description
    u'Please select the attachments to be sent with email when one has successfully finished inputs of the form.'

