[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/tests -
test_physicallocationadapters.py:1.13
Jim Fulton
jim at zope.com
Fri Aug 8 15:07:15 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/traversing/tests
In directory cvs.zope.org:/tmp/cvs-serv5310/src/zope/app/traversing/tests
Modified Files:
test_physicallocationadapters.py
Log Message:
In preparation for containergeddon, refactored away the use of
the side_effect_names in context wrappers to deal with path segments
with side effects.
=== Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py:1.12 Fri Jun 13 13:41:21 2003
+++ Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py Fri Aug 8 14:07:11 2003
@@ -56,54 +56,6 @@
self.assertRaises(TypeError, adapter.getName)
self.assertRaises(TypeError, adapter.getRoot)
- def testWSideEffectDataInFront(self):
- provideAdapter(None, IPhysicallyLocatable, WrapperPhysicallyLocatable)
- provideAdapter(IContainmentRoot, IPhysicallyLocatable,
- RootPhysicallyLocatable)
-
- root = Root()
- root = ContextWrapper(root, None,
- side_effect_names=("++skin++ZopeTop", ),
- )
- f1 = ContextWrapper(C(), root, name='f1')
- f2 = ContextWrapper(C(), f1, name='f2')
- f3 = ContextWrapper(C(), f2, name='f3')
-
- adapter = getAdapter(f3, IPhysicallyLocatable)
-
- self.assertEqual(adapter.getPath(), '/f1/f2/f3')
- self.assertEqual(adapter.getName(), 'f3')
- self.assertEqual(adapter.getRoot(), root)
-
- adapter = getAdapter(C(), IPhysicallyLocatable)
- self.assertRaises(TypeError, adapter.getPath)
- self.assertRaises(TypeError, adapter.getName)
- self.assertRaises(TypeError, adapter.getRoot)
-
- def testWSideEffectDataInMiddle(self):
- provideAdapter(None, IPhysicallyLocatable, WrapperPhysicallyLocatable)
- provideAdapter(IContainmentRoot, IPhysicallyLocatable,
- RootPhysicallyLocatable)
-
- root = Root()
- c = C()
- f1 = ContextWrapper(c, root,
- name='f1',
- side_effect_names=("++skin++ZopeTop", ),
- )
- f2 = ContextWrapper(C(), f1, name='f2')
- f3 = ContextWrapper(C(), f2, name='f3')
-
- adapter = getAdapter(f3, IPhysicallyLocatable)
-
- self.assertEqual(adapter.getPath(), '/f1/f2/f3')
- self.assertEqual(adapter.getName(), 'f3')
- self.assertEqual(adapter.getRoot(), root)
-
- adapter = getAdapter(C(), IPhysicallyLocatable)
- self.assertRaises(TypeError, adapter.getPath)
- self.assertRaises(TypeError, adapter.getName)
- self.assertRaises(TypeError, adapter.getRoot)
def test_suite():
return makeSuite(Test)
More information about the Zope3-Checkins
mailing list