[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/registration/tests - test_componentpathwidget.py:1.2.6.2 test_editregistration.py:1.2.6.2

Jim Fulton jim at zope.com
Mon Sep 8 18:15:40 EDT 2003


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

Modified Files:
      Tag: parentgeddon-branch
	test_componentpathwidget.py test_editregistration.py 
Log Message:
Made a bunch of tests pass. :)  Detailed messages will be provided
when merging to the head.



=== Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py 1.2.6.1 => 1.2.6.2 ===
--- Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py:1.2.6.1	Mon Sep  8 14:21:29 2003
+++ Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py	Mon Sep  8 17:15:09 2003
@@ -36,12 +36,17 @@
 class Component:
     implements(Interface)
 
+class SiteManagementFolder:
+    foo = Component()
+
+class RegistrationManager:
+    pass
+
 class Registration(Contained):
     implements(IComponentRegistration)
 
     path = 'foo'
 
-    foo = Component()
 
 class AbsoluteURL(BrowserView):
 
@@ -61,7 +66,10 @@
 
         field = ComponentPath(None, title=u"Path")
         field.__name__ = u'path'
-        reg = Registration()
+
+        folder = SiteManagementFolder()
+        rm = RegistrationManager(); rm.__parent__ = folder
+        reg = Registration(); reg.__parent__ = rm
         field = field.bind(reg)
         self.widget = ComponentPathWidget(field, TestRequest())
 


=== Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py 1.2.6.1 => 1.2.6.2 ===
--- Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py:1.2.6.1	Mon Sep  8 14:21:29 2003
+++ Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py	Mon Sep  8 17:15:09 2003
@@ -32,6 +32,7 @@
 from zope.publisher.browser import BrowserView
 from zope.publisher.browser import TestRequest
 from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.app.container.contained import Contained
 
 class Container(dict):
     implements(IContainer, IContainmentRoot)
@@ -39,7 +40,7 @@
 class I(Interface):
     pass
 
-class C:
+class C(Contained):
     implements(I)
     status = ActiveStatus
 
@@ -80,6 +81,9 @@
         c2 = C()
         c7 = C()
         d = Container({'1': c1, '2': c2, '7': c7})
+        c1.__parent__ = d; c1.__name__ = '1'
+        c2.__parent__ = d; c2.__name__ = '2'
+        c7.__parent__ = d; c7.__name__ = '7'
 
         view = EditRegistration(d, TestRequest())
 




More information about the Zope3-Checkins mailing list