[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/tests - testSecurityManagement.py:1.1.2.1 testSecurityManager.py:1.1.2.1 testUser.py:1.1.2.1

Tres Seaver tseaver@zope.com
Fri, 30 Nov 2001 16:06:41 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv10298/Zope/App/Security/tests

Added Files:
      Tag: Zope-3x-branch
	testSecurityManagement.py testSecurityManager.py testUser.py 
Log Message:
 - Stub in more of the security framework.

=== Added File Zope3/lib/python/Zope/App/Security/tests/testSecurityManagement.py ===
# Copyright (c) 2001 Zope Coporation and Contributors.  All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS 
# FOR A PARTICULAR PURPOSE.

""" Unit tests for SecurityManagement """

import unittest

from Interface import verify

class Test( unittest.TestCase ):

    def test_import( self ):
        from Zope.App.Security import SecurityManagement
        from Zope.App.Security.ISecurityManagement import ISecurityManagement
        from Zope.App.Security.ISecurityManagement \
            import ISecurityManagementSetup

        # 'verify' doesn't work for modules, as yet.
        #verify( ISecurityManagementSetup, SecurityManagement )
        #verify( ISecurityManagement, SecurityManagement )



=== Added File Zope3/lib/python/Zope/App/Security/tests/testSecurityManager.py ===
# Copyright (c) 2001 Zope Coporation and Contributors.  All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS 
# FOR A PARTICULAR PURPOSE.

""" Unit tests for SecurityManager """

import unittest

from Interface import verify

class Test( unittest.TestCase ):

    def test_import( self ):
        from Zope.App.Security.SecurityManager import SecurityManager
        from Zope.App.Security.ISecurityManager import ISecurityManager

        verify( ISecurityManager, SecurityManager )

    def test_creation( self ):
        
        from Zope.App.Security.SecurityManager import SecurityManager

        mgr = SecurityManager( None, None )


=== Added File Zope3/lib/python/Zope/App/Security/tests/testUser.py ===
# Copyright (c) 2001 Zope Coporation and Contributors.  All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS 
# FOR A PARTICULAR PURPOSE.

""" Unit tests for User """

import unittest

from Interface import verify

class Test( unittest.TestCase ):

    def test_import( self ):
        from Zope.App.Security.User import UserWithName
        from Zope.App.Security.IUser import IUser

        verify( IUser, UserWithName )