Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(17)  |  Call(12)  |  Derive(0)  |  Import(5)

src/f/t/ftw.participation-1.3.1/ftw/participation/browser/invite.py   ftw.participation(Download)
from ftw.participation.interfaces import IParticipationQuotaSupport
from ftw.participation.interfaces import IParticipationRegistry
from ftw.participation.invitation import Invitation
from plone.formwidget.autocomplete.widget import AutocompleteMultiFieldWidget
from plone.registry.interfaces import IRegistry
                if not email:
                    continue
                inv = Invitation(self.context, email, inviter.getId(), roles)
                self.send_invitation(inv, email, inviter, data.get('comment'))
                emails.append(email)

src/f/t/ftw.participation-1.3.1/ftw/participation/tests/test_participants.py   ftw.participation(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.participation.interfaces import IParticipationSupport
from ftw.participation.invitation import Invitation
from ftw.participation.tests.layer import FTW_PARTICIPATION_INTEGRATION_TESTING
    def test_get_pending_invitations(self):
        invitation = Invitation(target=self.demo_folder,
                                email='user@email.com',
                                inviter=TEST_USER_NAME,
                                roles=['Reader'])
 
        Invitation(
            target=self.demo_folder,
            email='user@email.com',
            inviter=TEST_USER_NAME,
    def test_readonly_if_not_inviter(self):
        Invitation(
            target=self.demo_folder,
            email='user@email.com',
            inviter='dummyuser',
    def test_remove_invitation(self):
        invitation = Invitation(target=self.demo_folder,
                                email='user@email.com',
                                inviter=TEST_USER_ID,
                                roles=['Reader'])

src/f/t/ftw.participation-1.3.1/ftw/participation/tests/test_accept.py   ftw.participation(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.participation.interfaces import IParticipationRegistry
from ftw.participation.interfaces import IParticipationSupport
from ftw.participation.invitation import Invitation
    def test_accept_confirmation_mail_encodings(self):
        invitation = Invitation(target=self.folder,
                                email='felix@leiter.com',
                                inviter='james.bond',
                                roles=['Reader'])
    def test_accepting_sets_roles_on_context(self):
        login(self.portal, 'james.bond')
        invitation = Invitation(target=self.folder,
                                email='felix@leiter.com',
                                inviter='james.bond',
    def test_Reader_role_is_added_by_default(self):
        login(self.portal, 'james.bond')
        invitation = Invitation(target=self.folder,
                                email='felix@leiter.com',
                                inviter='james.bond',
 
        login(self.portal, 'james.bond')
        invitation = Invitation(target=self.folder,
                                email='felix@leiter.com',
                                inviter='james.bond',

src/f/t/ftw.participation-1.3.1/ftw/participation/tests/test_register_login.py   ftw.participation(Download)
from ftw.participation.tests.layer import FTW_PARTICIPATION_FUNCTIONAL_TESTING
from ftw.participation.tests.layer import TEST_USER_ID_2, TEST_USER_PW_2
from plone.testing.z2 import Browser
from unittest2 import TestCase
from ftw.participation.invitation import Invitation
    def test_userid_differ_userlogin(self):
        member = self.portal.portal_membership.getMemberById(TEST_USER_ID_2)
        member.setMemberProperties({'email':'foo@bar.com'})
        inv1 = Invitation(target=self.demo_folder, email='foo@bar.com', inviter='admin',
                          roles=['Reader'])

src/f/t/ftw.participation-1.3.1/ftw/participation/tests/builders.py   ftw.participation(Download)
from AccessControl import getSecurityManager
from ftw.builder import builder_registry
from ftw.participation.invitation import Invitation
import transaction
 
    def create(self, **kwargs):
        self.before_create()
        obj = Invitation(**self.arguments)
        self.after_create(obj)
        return obj