[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/viewmodule - tests.py:1.3

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Apr 15 09:25:00 EDT 2004


Update of /cvs-repository/Zope3/src/zope/app/apidoc/viewmodule
In directory cvs.zope.org:/tmp/cvs-serv9600/src/zope/app/apidoc/viewmodule

Modified Files:
	tests.py 
Log Message:


Provide new adapters.



Add documentation string to skin definitions.




=== Zope3/src/zope/app/apidoc/viewmodule/tests.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/apidoc/viewmodule/tests.py:1.2	Mon Mar 29 21:01:24 2004
+++ Zope3/src/zope/app/apidoc/viewmodule/tests.py	Thu Apr 15 09:24:58 2004
@@ -23,6 +23,11 @@
 from zope.app.tests import placelesssetup, ztapi
 from zope.app.component.interface import provideInterface
 
+from zope.app.apidoc.viewmodule import ISkinRegistration
+from zope.app.apidoc.viewmodule import ISkinDocumentation, SkinDocumentation
+from zope.app.apidoc.viewmodule import ILayerRegistration
+from zope.app.apidoc.viewmodule import ILayerDocumentation, LayerDocumentation
+
 class IFoo(Interface):
     pass
 
@@ -31,16 +36,25 @@
 
 def setUp():
     placelesssetup.setUp()
+
+    ztapi.provideAdapter(ISkinRegistration, ISkinDocumentation,
+                         SkinDocumentation)
+    ztapi.provideAdapter(ILayerRegistration, ILayerDocumentation,
+                         LayerDocumentation)
+
     pres = zapi.getService(None, 'Presentation')
     for index in range(1, 6):
         pres.defineLayer('layer'+str(index))
-    pres.defineSkin('skinA', ['default'])
-    pres.defineSkin('skinB', ['layer5', 'layer4', 'default'])
-    pres.defineSkin('skinC', ['layer4', 'layer2', 'layer1', 'default'])
+    pres.defineSkin('skinA', ['default'], 'doc skin A')
+    pres.defineSkin('skinB', ['layer5', 'layer4', 'default'], 'doc skin B')
+    pres.defineSkin('skinC', ['layer4', 'layer2', 'layer1', 'default'],
+                    'doc skin C')
+    pres.setDefaultSkin('skinA', 'default is A')
 
     provideInterface('IFoo', IFoo)
     provideInterface('IBrowserRequest', IBrowserRequest)
     ztapi.browserView(IFoo, 'index.html', FooView, layer='default')
+
     
 
 def tearDown():




More information about the Zope3-Checkins mailing list