def test_get_mail(self):
        context = self.portal
        result = plone_session.get_email(context)
        self.assertEqual(None, result)

        plone_session.set_email(context, '*****@*****.**')
        result = plone_session.get_email(context)
        self.assertEqual('*****@*****.**', result)
示例#2
0
    def test_get_mail(self):
        context = self.portal
        result = plone_session.get_email(context)
        self.assertEqual(None, result)

        plone_session.set_email(context, '*****@*****.**')
        result = plone_session.get_email(context)
        self.assertEqual('*****@*****.**', result)
示例#3
0
    def email(self, form_data=None):

        if not form_data or not form_data.get('email'):
            email = plone_session.get_email(self.context)
        else:
            email = form_data['email']
            plone_session.set_email(self.context, email)

        return email