[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Publisher/Browser/tests - testDirectives.py:1.12 testFileResource.py:1.5 testGlobalBrowserMenuService.py:1.3 testGlobalBrowserMenuServiceDirectives.py:1.5 testI18nFileResource.py:1.3 testIconDirective.py:1.5 testResources.py:1.5

Jim Fulton jim@zope.com
Fri, 4 Oct 2002 14:37:54 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/Publisher/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv21435/lib/python/Zope/App/Publisher/Browser/tests

Modified Files:
	testDirectives.py testFileResource.py 
	testGlobalBrowserMenuService.py 
	testGlobalBrowserMenuServiceDirectives.py 
	testI18nFileResource.py testIconDirective.py testResources.py 
Log Message:
Many components now need to generate events. This means that an event
service needs to be in place when testing. For this reason, I've
refactored PlacelessSetup to include events. 

- I added a PlacelessSetup in Zope.Event.tests.

  This module also registers a subscriber that collects all events in
  a list and a function for getting all of the events that match an
  optional event type or filter. This is useful so that component
  tests can include tests to make sure that the proper events are
  being fired.

- I added a PlacelessSetup in Zope.App.tests that combines the
  PlacelessSetup from Zope.App.ComponentArchitecture and Zope.Event.

- I changed all the modules that imported
  Zope.ComponentArchitecture.tests.PlacelessSetup to import
  Zope.App.tests.PlacelessSetup.



=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testDirectives.py 1.11 => 1.12 ===
--- Zope3/lib/python/Zope/App/Publisher/Browser/tests/testDirectives.py:1.11	Tue Jun 25 10:44:51 2002
+++ Zope3/lib/python/Zope/App/Publisher/Browser/tests/testDirectives.py	Fri Oct  4 14:37:23 2002
@@ -20,7 +20,7 @@
 from Zope.ComponentArchitecture.tests.TestViews import IC, V1, VZMI, R1, RZMI
 from Zope.ComponentArchitecture import getView, queryView, queryResource
 from Zope.ComponentArchitecture import getDefaultViewName, getResource
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.App.tests.PlacelessSetup import PlacelessSetup
 from Zope.Security.Proxy import ProxyFactory
 from cStringIO import StringIO
 


=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testFileResource.py 1.4 => 1.5 ===
--- Zope3/lib/python/Zope/App/Publisher/Browser/tests/testFileResource.py:1.4	Wed Jul 17 12:54:19 2002
+++ Zope3/lib/python/Zope/App/Publisher/Browser/tests/testFileResource.py	Fri Oct  4 14:37:23 2002
@@ -23,7 +23,7 @@
 
 from Zope.Exceptions import NotFoundError
 
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.App.tests.PlacelessSetup import PlacelessSetup
 from Zope.ComponentArchitecture.GlobalResourceService import provideResource
 from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter
 


=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testGlobalBrowserMenuService.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/Publisher/Browser/tests/testGlobalBrowserMenuService.py:1.2	Wed Jul 17 12:54:19 2002
+++ Zope3/lib/python/Zope/App/Publisher/Browser/tests/testGlobalBrowserMenuService.py	Fri Oct  4 14:37:23 2002
@@ -23,7 +23,7 @@
 from Zope.Exceptions import Forbidden, Unauthorized, DuplicationError
 from Interface import Interface
 from Zope.Publisher.Browser.BrowserRequest import TestRequest
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.App.tests.PlacelessSetup import PlacelessSetup
 
 class I1(Interface): pass
 class I11(I1): pass


=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testGlobalBrowserMenuServiceDirectives.py 1.4 => 1.5 ===
--- Zope3/lib/python/Zope/App/Publisher/Browser/tests/testGlobalBrowserMenuServiceDirectives.py:1.4	Tue Oct  1 08:49:08 2002
+++ Zope3/lib/python/Zope/App/Publisher/Browser/tests/testGlobalBrowserMenuServiceDirectives.py	Fri Oct  4 14:37:23 2002
@@ -24,7 +24,7 @@
 from Zope.Configuration.xmlconfig import xmlconfig, XMLConfig
 from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
 from Zope.Publisher.Browser.BrowserRequest import TestRequest
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.App.tests.PlacelessSetup import PlacelessSetup
 
 import Zope.App.Publisher.Browser
 


=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testI18nFileResource.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/Publisher/Browser/tests/testI18nFileResource.py:1.2	Wed Jul 17 12:54:19 2002
+++ Zope3/lib/python/Zope/App/Publisher/Browser/tests/testI18nFileResource.py	Fri Oct  4 14:37:23 2002
@@ -23,7 +23,7 @@
 
 from Zope.Exceptions import NotFoundError
 
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.App.tests.PlacelessSetup import PlacelessSetup
 from Zope.ComponentArchitecture.GlobalResourceService import provideResource
 from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter
 


=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testIconDirective.py 1.4 => 1.5 ===
--- Zope3/lib/python/Zope/App/Publisher/Browser/tests/testIconDirective.py:1.4	Wed Jul 17 12:54:19 2002
+++ Zope3/lib/python/Zope/App/Publisher/Browser/tests/testIconDirective.py	Fri Oct  4 14:37:23 2002
@@ -22,7 +22,7 @@
 
 from Zope.Exceptions import Forbidden
 from Zope.Proxy.ProxyIntrospection import removeAllProxies
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.App.tests.PlacelessSetup import PlacelessSetup
 from Zope.Configuration.xmlconfig import xmlconfig, XMLConfig
 from Zope.ComponentArchitecture.tests.Request import Request
 from Zope.ComponentArchitecture.tests.TestViews import IC


=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testResources.py 1.4 => 1.5 ===
--- Zope3/lib/python/Zope/App/Publisher/Browser/tests/testResources.py:1.4	Wed Jul 17 12:54:19 2002
+++ Zope3/lib/python/Zope/App/Publisher/Browser/tests/testResources.py	Fri Oct  4 14:37:23 2002
@@ -19,7 +19,7 @@
 
 from unittest import TestCase, TestSuite, main, makeSuite
 
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.App.tests.PlacelessSetup import PlacelessSetup
 from Zope.ComponentArchitecture.GlobalResourceService import provideResource
 from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter