~ubuntu-branches/ubuntu/wily/zope.app.security/wily

« back to all changes in this revision

Viewing changes to src/zope/app/security/tests/test_interfaces.py

  • Committer: Bazaar Package Importer
  • Author(s): Gediminas Paulauskas
  • Date: 2010-12-02 19:34:05 UTC
  • Revision ID: james.westby@ubuntu.com-20101202193405-ssc1x1c1pznqdrnc
Tags: upstream-3.7.5
ImportĀ upstreamĀ versionĀ 3.7.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
##############################################################################
 
2
#
 
3
# Copyright (c) 2009 Zope Corporation and Contributors.
 
4
# All Rights Reserved.
 
5
#
 
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.
 
12
#
 
13
##############################################################################
 
14
"""Test importability of BBB interfaces
 
15
 
 
16
$Id: test_interfaces.py 106799 2009-12-20 04:50:49Z fafhrd $
 
17
"""
 
18
import unittest
 
19
from zope.testing import doctest
 
20
 
 
21
def test_bbb_imports():
 
22
    """
 
23
    Let's check that permission vocabularies that were moved to
 
24
    zope.security are still importable from original place.
 
25
 
 
26
      >>> import zope.app.security.interfaces as old
 
27
      >>> import zope.authentication.interfaces as new
 
28
 
 
29
      >>> old.PrincipalLookupError is new.PrincipalLookupError
 
30
      True
 
31
      >>> old.IUnauthenticatedPrincipal is new.IUnauthenticatedPrincipal
 
32
      True
 
33
      >>> old.IFallbackUnauthenticatedPrincipal is new.IFallbackUnauthenticatedPrincipal
 
34
      True
 
35
      >>> old.IUnauthenticatedGroup is new.IUnauthenticatedGroup
 
36
      True
 
37
      >>> old.IAuthenticatedGroup is new.IAuthenticatedGroup
 
38
      True
 
39
      >>> old.IEveryoneGroup is new.IEveryoneGroup
 
40
      True
 
41
      >>> old.IAuthentication is new.IAuthentication
 
42
      True
 
43
      >>> old.ILoginPassword is new.ILoginPassword
 
44
      True
 
45
      >>> old.IPrincipalSource is new.IPrincipalSource
 
46
      True
 
47
      >>> old.ILogout is new.ILogout
 
48
      True
 
49
      >>> old.ILogoutSupported is new.ILogoutSupported
 
50
      True
 
51
 
 
52
      >>> import zope.security.interfaces as new
 
53
 
 
54
      >>> old.IPrincipal is new.IPrincipal
 
55
      True
 
56
      >>> old.IPermission is new.IPermission
 
57
      True
 
58
      >>> old.IGroup is new.IGroup
 
59
      True
 
60
 
 
61
    """
 
62
 
 
63
def test_suite():
 
64
    return unittest.TestSuite((
 
65
        doctest.DocTestSuite(),
 
66
        ))