[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_interfaceservice.py:1.2.2.1 eventsetup.py:1.7.10.2 objecthubsetup.py:1.10.10.2 placefulsetup.py:1.20.2.2 registrationstack.py:1.1.2.2 test_adapter.py:1.12.2.2 test_auth.py:1.13.10.2 test_cachingservice.py:1.8.16.2 test_connectionservice.py:1.8.10.2 test_errorreportingservice.py:1.2.26.1 test_eventservice.py:1.20.10.2 test_field.py:1.6.18.2 test_folder.py:1.3.16.2 test_module.py:1.6.10.2 test_objecthub.py:1.9.10.2 test_pagefolder.py:1.3.16.2 test_principalannotation.py:1.3.10.2 test_registrations.py:1.1.2.2 test_registrationstatusproperty.py:1.1.2.2 test_roleservice.py:1.2.26.2 test_servicemanager.py:1.8.10.2 test_utility.py:1.5.10.2 test_view.py:1.11.10.2

Albertas Agejevas alga@codeworks.lt
Mon, 23 Jun 2003 10:20:53 -0400


Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv16963/src/zope/app/services/tests

Modified Files:
      Tag: cw-mail-branch
	eventsetup.py objecthubsetup.py placefulsetup.py 
	registrationstack.py test_adapter.py test_auth.py 
	test_cachingservice.py test_connectionservice.py 
	test_errorreportingservice.py test_eventservice.py 
	test_field.py test_folder.py test_module.py test_objecthub.py 
	test_pagefolder.py test_principalannotation.py 
	test_registrations.py test_registrationstatusproperty.py 
	test_roleservice.py test_servicemanager.py test_utility.py 
	test_view.py 
Added Files:
      Tag: cw-mail-branch
	test_interfaceservice.py 
Log Message:
One more sync with HEAD.

=== Added File Zope3/src/zope/app/services/tests/test_interfaceservice.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
#
##############################################################################
import unittest

from zope.component.exceptions import ComponentLookupError
from zope.interface import Interface
from zope.interface.verify import verifyObject

from zope.app.component.globalinterfaceservice \
     import interfaceService as globalService
from zope.app.interfaces.component import IInterfaceService
from zope.app.services.interface import LocalInterfaceService
from zope.app.services.servicenames import Interfaces
from zope.app.tests import setup

from zope.app.component.tests.absIInterfaceService \
     import IInterfaceServiceTests

class Test(IInterfaceServiceTests, unittest.TestCase):
    """Test Interface for LocalInterfaceService instance."""

    def setUp(self):
        setup.placefulSetUp()

    def tearDown(self):
        setup.placefulTearDown()
        
    def getServices(self):
        rootFolder = setup.buildSampleFolderTree()
        mgr = setup.createServiceManager(rootFolder)
        service = setup.addService(mgr, Interfaces, LocalInterfaceService())
        return service, globalService

def test_suite():
    return unittest.makeSuite(Test)


=== Zope3/src/zope/app/services/tests/eventsetup.py 1.7.10.1 => 1.7.10.2 ===


=== Zope3/src/zope/app/services/tests/objecthubsetup.py 1.10.10.1 => 1.10.10.2 ===


=== Zope3/src/zope/app/services/tests/placefulsetup.py 1.20.2.1 => 1.20.2.2 ===


=== Zope3/src/zope/app/services/tests/registrationstack.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/services/tests/registrationstack.py:1.1.2.1	Sun Jun 22 10:23:28 2003
+++ Zope3/src/zope/app/services/tests/registrationstack.py	Mon Jun 23 10:20:22 2003
@@ -12,9 +12,13 @@
 #
 ##############################################################################
 
+from zope.app.services.registration import RegistrationStatusProperty
+
 __metaclass__ = type
 
 class TestingRegistration:
+    status = RegistrationStatusProperty()
+
     def __init__(self, id):
         self.id = id
 


=== Zope3/src/zope/app/services/tests/test_adapter.py 1.12.2.1 => 1.12.2.2 ===


=== Zope3/src/zope/app/services/tests/test_auth.py 1.13.10.1 => 1.13.10.2 ===


=== Zope3/src/zope/app/services/tests/test_cachingservice.py 1.8.16.1 => 1.8.16.2 ===


=== Zope3/src/zope/app/services/tests/test_connectionservice.py 1.8.10.1 => 1.8.10.2 ===


=== Zope3/src/zope/app/services/tests/test_errorreportingservice.py 1.2 => 1.2.26.1 ===
--- Zope3/src/zope/app/services/tests/test_errorreportingservice.py:1.2	Wed Dec 25 09:13:20 2002
+++ Zope3/src/zope/app/services/tests/test_errorreportingservice.py	Mon Jun 23 10:20:22 2003
@@ -16,11 +16,10 @@
 Revision information:
 $Id$
 """
-import sys
 
+import sys
 from unittest import TestCase, TestLoader, TextTestRunner
-from zope.app.services.errorr \
-     import ErrorReportingService
+from zope.app.services.error import ErrorReportingService
 from zope.testing.cleanup import CleanUp
 from zope.exceptions.exceptionformatter import format_exception
 


=== Zope3/src/zope/app/services/tests/test_eventservice.py 1.20.10.1 => 1.20.10.2 ===


=== Zope3/src/zope/app/services/tests/test_field.py 1.6.18.1 => 1.6.18.2 ===


=== Zope3/src/zope/app/services/tests/test_folder.py 1.3.16.1 => 1.3.16.2 ===


=== Zope3/src/zope/app/services/tests/test_module.py 1.6.10.1 => 1.6.10.2 ===


=== Zope3/src/zope/app/services/tests/test_objecthub.py 1.9.10.1 => 1.9.10.2 ===


=== Zope3/src/zope/app/services/tests/test_pagefolder.py 1.3.16.1 => 1.3.16.2 ===


=== Zope3/src/zope/app/services/tests/test_principalannotation.py 1.3.10.1 => 1.3.10.2 ===


=== Zope3/src/zope/app/services/tests/test_registrations.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/services/tests/test_registrations.py:1.1.2.1	Sun Jun 22 10:23:28 2003
+++ Zope3/src/zope/app/services/tests/test_registrations.py	Mon Jun 23 10:20:22 2003
@@ -59,6 +59,16 @@
 
 class TestSimpleRegistration(TestCase):
 
+    def setUp(self):
+        # We can't use the status property on a SimpleRegistration instance.
+        # we disable it for these tests
+        self.__oldprop = SimpleRegistration.status
+        del SimpleRegistration.status
+
+    def tearDown(self):
+        # Restore the status prop
+        SimpleRegistration.status = self.__oldprop
+
     def test_beforeDeleteHook(self):
         container = object()
         cfg = SimpleRegistration()
@@ -78,6 +88,7 @@
 class TestComponentRegistration(TestSimpleRegistration, PlacefulSetup):
 
     def setUp(self):
+        TestSimpleRegistration.setUp(self)
         PlacefulSetup.setUp(self, site=True)
         self.name = 'foo'
 


=== Zope3/src/zope/app/services/tests/test_registrationstatusproperty.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/services/tests/test_registrationstatusproperty.py:1.1.2.1	Sun Jun 22 10:23:28 2003
+++ Zope3/src/zope/app/services/tests/test_registrationstatusproperty.py	Mon Jun 23 10:20:22 2003
@@ -23,7 +23,6 @@
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.services.tests.registrationstack import TestingRegistration
 from zope.app.services.tests.registrationstack import TestingRegistrationStack
-from zope.app.services.registration import RegistrationStatusProperty
 from zope.app.interfaces.services.registration import RegisteredStatus
 from zope.app.interfaces.services.registration import UnregisteredStatus
 from zope.app.interfaces.services.registration import ActiveStatus
@@ -35,16 +34,13 @@
 
 class TestingRegistration(TestingRegistration):
     serviceType = "Services"
-    status = RegistrationStatusProperty()
     service_type = "Test"
 
 class PassiveRegistration(TestingRegistration):
     serviceType = "NoSuchService"
-    status = RegistrationStatusProperty()
 
 class UtilityRegistration(TestingRegistration):
     serviceType = "Utilities"
-    status = RegistrationStatusProperty()
 
 class TestingRegistrationStack(TestingRegistrationStack):
     class_ = TestingRegistration


=== Zope3/src/zope/app/services/tests/test_roleservice.py 1.2.26.1 => 1.2.26.2 ===


=== Zope3/src/zope/app/services/tests/test_servicemanager.py 1.8.10.1 => 1.8.10.2 ===


=== Zope3/src/zope/app/services/tests/test_utility.py 1.5.10.1 => 1.5.10.2 ===


=== Zope3/src/zope/app/services/tests/test_view.py 1.11.10.1 => 1.11.10.2 ===