Test coverage for vnccollab.theme.userdataschema
1: from zope import schema
1: from zope.component import adapts
1: from zope.interface import implements, Interface
1: from zope.publisher.browser import IBrowserRequest
1: from collective.customizablePersonalizeForm.adapters.interfaces import \
IExtendedUserDataSchema, IExtendedUserDataPanel
1: from vnccollab.theme import messageFactory as _
2: class UserDataSchemaAdapter(object):
1: adapts(object, IBrowserRequest)
1: implements(IExtendedUserDataSchema)
1: def __init__(self, context, request):
>>>>>> self.context = context
>>>>>> self.request = request
1: def getSchema(self):
>>>>>> return IUserDataSchema
2: class UserDataSchemaPropertiesAdapter(object):
1: adapts(object, IBrowserRequest)
1: implements(IExtendedUserDataPanel)
1: def __init__(self, context, request):
>>>>>> self.context = context
>>>>>> self.request = request
1: def getProperties(self):
>>>>>> return ['zimbra_username', 'zimbra_password',
>>>>>> 'etherpad_url', 'etherpad_username', 'etherpad_password',
>>>>>> 'openerp_username', 'openerp_password',
>>>>>> 'redmine_username', 'redmine_password'
]
2: class IUserDataSchema(Interface):
1: zimbra_username = schema.ASCIILine(
1: title=_("Zimbra Username"),
1: description=_(u"We need this field in order to display your Zimbra "
"related information, like mail box, calendar, contacts, "
"etc..."),
1: required=False)
1: zimbra_password = schema.Password(
1: title=_("Zimbra Password"),
1: description=_(u"We need this field in order to display your Zimbra "
"related information, like mail box, calendar, contacts, "
"etc..."),
1: required=False)
1: etherpad_url = schema.URI(
1: title=_(u"Etherpad URL"),
1: description=_(u"Root url to your Etherpad service. This field is "
"usually useful in case every user got his own Etherpad url instead"
" of using one global domain for all users."),
1: required=False)
1: etherpad_username = schema.ASCIILine(
1: title=_("Etherpad Username"),
1: description=_(u"We need this field in order to display your Etherpad "
"related information, like single pad or whole list of "
"pads, etc..."),
1: required=False)
1: etherpad_password = schema.Password(
1: title=_("Etherpad Password"),
1: description=_(u"We need this field in order to display your Etherpad "
"related information, like single pad or whole list of "
"pads, etc..."),
1: required=False)
1: openerp_username = schema.ASCIILine(
1: title=_("OpenERP Username"),
1: description=_(u"We need this field in order to display your OpenERP "
"related information."),
1: required=False)
1: openerp_password = schema.Password(
1: title=_("OpenERP Password"),
1: description=_(u"We need this field in order to display your OpenERP "
"related information."),
1: required=False)