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

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

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'])
        url = '%s/@@invitations?iid=%s' % (self.portal_url, inv1.iid)
        transaction.commit()
        self.browser.addHeader('Authorization', 'Basic %s:%s' % (
            TEST_USER_ID_2, TEST_USER_PW_2, ))