1
##############################################################################
3
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
6
# This software is subject to the provisions of the Zope Public License,
7
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
# FOR A PARTICULAR PURPOSE.
13
##############################################################################
14
"""Global Authentication Serive or Principal Registry Tests
16
$Id: test_principalregistry.py 106799 2009-12-20 04:50:49Z fafhrd $
19
from zope.testing import doctest
21
def test_bbb_imports():
23
Let's check that principal registry that was moved to
24
zope.principalregistry is still importable from original places.
26
>>> import zope.app.security.principalregistry as old
27
>>> import zope.principalregistry.principalregistry as new
29
>>> old.DuplicateLogin is new.DuplicateLogin
31
>>> old.DuplicateId is new.DuplicateId
33
>>> old.PrincipalRegistry is new.PrincipalRegistry
35
>>> old.principalRegistry is new.principalRegistry
37
>>> old.PrincipalBase is new.PrincipalBase
39
>>> old.Group is new.Group
41
>>> old.Principal is new.Principal
43
>>> old.UnauthenticatedPrincipal is new.UnauthenticatedPrincipal
45
>>> old.fallback_unauthenticated_principal is new.fallback_unauthenticated_principal
47
>>> old.UnauthenticatedGroup is new.UnauthenticatedGroup
49
>>> old.AuthenticatedGroup is new.AuthenticatedGroup
51
>>> old.EverybodyGroup is new.EverybodyGroup
54
>>> import zope.app.security.metadirectives as old
55
>>> import zope.principalregistry.metadirectives as new
57
>>> old.IBasePrincipalDirective is new.IBasePrincipalDirective
59
>>> old.IDefinePrincipalDirective is new.IDefinePrincipalDirective
61
>>> old.IDefineUnauthenticatedPrincipalDirective is new.IDefineUnauthenticatedPrincipalDirective
63
>>> old.IDefineUnauthenticatedGroupDirective is new.IDefineUnauthenticatedGroupDirective
65
>>> old.IDefineAuthenticatedGroupDirective is new.IDefineAuthenticatedGroupDirective
67
>>> old.IDefineEverybodyGroupDirective is new.IDefineEverybodyGroupDirective
70
>>> import zope.app.security.metaconfigure as old
71
>>> import zope.principalregistry.metaconfigure as new
73
>>> old.principal is new.principal
75
>>> old.unauthenticatedPrincipal is new.unauthenticatedPrincipal
77
>>> old.unauthenticatedGroup is new.unauthenticatedGroup
79
>>> old.authenticatedGroup is new.authenticatedGroup
81
>>> old.everybodyGroup is new.everybodyGroup
87
return unittest.TestSuite((
88
doctest.DocTestSuite(),