[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_servicemanager.py:1.16.6.2

Jim Fulton cvs-admin at zope.org
Tue Nov 11 13:44:06 EST 2003


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

Modified Files:
      Tag: adaptergeddon-branch
	test_servicemanager.py 
Log Message:
Added code to make sure that insertion of local sites between local
sites adjusts the various connections correctly.


=== Zope3/src/zope/app/services/tests/test_servicemanager.py 1.16.6.1 => 1.16.6.2 ===
--- Zope3/src/zope/app/services/tests/test_servicemanager.py:1.16.6.1	Tue Nov 11 12:27:53 2003
+++ Zope3/src/zope/app/services/tests/test_servicemanager.py	Tue Nov 11 13:44:05 2003
@@ -219,13 +219,23 @@
         mr = root.getSiteManager()
         m1 = setup.createServiceManager(zapi.traverse(root, 'folder1')) 
         m2 = setup.createServiceManager(zapi.traverse(root, 'folder2'))
-        m11 = setup.createServiceManager(
-            zapi.traverse(root, 'folder1/folder1_1'))
+        m111 = setup.createServiceManager(
+            zapi.traverse(root, 'folder1/folder1_1/folder1_1_1'))
         self.assertEqual(m1.next, mr)
         self.assertEqual(m2.next, mr)
-        self.assertEqual(m11.next, m1)
+        self.assertEqual(m111.next, m1)
         self.assertEqual(mr.subSites, (m1, m2))
+        self.assertEqual(m1.subSites, (m111, ))
+
+        # Now insert a site and make sure everything is still right:
+        m11 = setup.createServiceManager(
+            zapi.traverse(root, 'folder1/folder1_1'))
+        self.assertEqual(m11.next, m1)
+        self.assertEqual(m111.next, m11)
         self.assertEqual(m1.subSites, (m11, ))
+        self.assertEqual(m11.subSites, (m111, ))
+
+        
 
 
 def test_suite():




More information about the Zope3-Checkins mailing list