[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/tests - test_conveniencefunctions.py:1.11 test_physicallocationadapters.py:1.6
Albertas Agejevas
alga@codeworks.lt
Wed, 19 Mar 2003 14:57:36 -0500
Update of /cvs-repository/Zope3/src/zope/app/traversing/tests
In directory cvs.zope.org:/tmp/cvs-serv11034/src/zope/app/traversing/tests
Modified Files:
test_conveniencefunctions.py test_physicallocationadapters.py
Log Message:
Renamed getPgysicalPathString() to getPath().
Got rid of getPhysicalPath() (which used to return a tuple) by replacing it
by getPath().
=== Zope3/src/zope/app/traversing/tests/test_conveniencefunctions.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/traversing/tests/test_conveniencefunctions.py:1.10 Wed Mar 19 12:55:37 2003
+++ Zope3/src/zope/app/traversing/tests/test_conveniencefunctions.py Wed Mar 19 14:57:34 2003
@@ -58,7 +58,7 @@
self.item = ContextWrapper(item, self.folder, name='item')
self.unwrapped_item = item
self.broken_chain_folder = ContextWrapper(folder, None)
- self.broken_chain_item = ContextWrapper(item,
+ self.broken_chain_item = ContextWrapper(item,
self.broken_chain_folder,
name='item'
)
@@ -206,31 +206,17 @@
self.unwrapped_item
)
- def testGetPhysicalPath(self):
- from zope.app.traversing import getPhysicalPath
- self.assertEqual(
- getPhysicalPath(self.item),
- ('', 'folder', 'item')
- )
-
def testGetPhysicalPathString(self):
- from zope.app.traversing import getPhysicalPathString
+ from zope.app.traversing import getPath
self.assertEqual(
- getPhysicalPathString(self.item),
+ getPath(self.item),
u'/folder/item'
)
- def testGetPhysicalPathOfRoot(self):
- from zope.app.traversing import getPhysicalPath
- self.assertEqual(
- getPhysicalPath(self.root),
- ('',)
- )
-
def testGetPhysicalPathStringOfRoot(self):
- from zope.app.traversing import getPhysicalPathString
+ from zope.app.traversing import getPath
self.assertEqual(
- getPhysicalPathString(self.root),
+ getPath(self.root),
u'/',
)
=== Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py:1.5 Wed Mar 19 12:55:37 2003
+++ Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py Wed Mar 19 14:57:34 2003
@@ -43,11 +43,11 @@
adapter = getAdapter(f3, IPhysicallyLocatable)
- self.assertEqual(adapter.getPhysicalPath(), ('', 'f1', 'f2', 'f3'))
+ self.assertEqual(adapter.getPath(), '/f1/f2/f3')
self.assertEqual(adapter.getRoot(), root)
adapter = getAdapter(C(), IPhysicallyLocatable)
- self.assertRaises(TypeError, adapter.getPhysicalPath)
+ self.assertRaises(TypeError, adapter.getPath)
self.assertRaises(TypeError, adapter.getRoot)
def testWSideEffectDataInFront(self):
@@ -64,11 +64,11 @@
adapter = getAdapter(f3, IPhysicallyLocatable)
- self.assertEqual(adapter.getPhysicalPath(), ('', 'f1', 'f2', 'f3'))
+ self.assertEqual(adapter.getPath(), '/f1/f2/f3')
self.assertEqual(adapter.getRoot(), root)
adapter = getAdapter(C(), IPhysicallyLocatable)
- self.assertRaises(TypeError, adapter.getPhysicalPath)
+ self.assertRaises(TypeError, adapter.getPath)
self.assertRaises(TypeError, adapter.getRoot)
def testWSideEffectDataInMiddle(self):
@@ -86,11 +86,11 @@
adapter = getAdapter(f3, IPhysicallyLocatable)
- self.assertEqual(adapter.getPhysicalPath(), ('', 'f1', 'f2', 'f3'))
+ self.assertEqual(adapter.getPath(), '/f1/f2/f3')
self.assertEqual(adapter.getRoot(), root)
adapter = getAdapter(C(), IPhysicallyLocatable)
- self.assertRaises(TypeError, adapter.getPhysicalPath)
+ self.assertRaises(TypeError, adapter.getPath)
self.assertRaises(TypeError, adapter.getRoot)
def test_suite():