4 paula.plonepas Package Readme
5 =============================
7 >>> from paula.suite import createPaulaSuite
8 >>> root = getRootFolder()
9 >>> creatPaulaSuite(root, create_pau=True, create_credplugin=True)
16 >>> from paula.examples.content import MinimalPloneUser
17 >>> user = MinimalPloneUser(
19 ... password=u"correct",
20 ... email=u"foo@bar.com",
21 ... realname=u"Foo Bar",
25 Create our PlonePAS authentication plugin and try to authenticate
27 >>> from paula.plonepas.plugins.auth import AuthenticationPlugin
28 >>> pas_ap = AuthenticationPlugin('pas_ap')
33 >>> creds['login']="login"
34 >>> creds['password']="wrong"
35 >>> pas_ap.authenticateCredentials(creds) is None
40 >>> creds['password']="correct"
41 >>> pas_ap.authenticateCredentials(creds)
46 >>> creds['login']="wrong"
47 >>> pas_ap.authenticateCredentials(creds) is None
56 Create our PlonePAS properties plugin and try to fetch properties
58 >>> from paula.plonepas.plugins.properties import PropertiesPlugin
59 >>> pas_pp = PropertiesPlugin('pas_pp')
63 >>> ploneuser = Mock(getId = lambda : u"login")
64 >>> psheet = pas_pp.getPropertiesForUser(ploneuser)
67 >>> psheet.propertyIds()
69 >>> psheet.propertyValues()
70 [u'foo@bar.com', u'Foo Bar']