[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/tests - test_acquire.py:1.11 test_atteritem.py:1.5 test_etc.py:1.7 test_namespacetrversal.py:1.10 test_presentation.py:1.8 test_skin.py:1.6 test_traverser.py:1.19 test_vh.py:1.3

Jim Fulton jim at zope.com
Sat Apr 17 13:16:06 EDT 2004


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

Modified Files:
	test_acquire.py test_atteritem.py test_etc.py 
	test_namespacetrversal.py test_presentation.py test_skin.py 
	test_traverser.py test_vh.py 
Log Message:
Removed the last vestiges of name parameters. Even though we stopped
supporting parameters in names (name;foo=bar) years ago, we still had
support in the apis. Sheesh.


=== Zope3/src/zope/app/traversing/tests/test_acquire.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/traversing/tests/test_acquire.py:1.10	Sat Mar 13 16:03:23 2004
+++ Zope3/src/zope/app/traversing/tests/test_acquire.py	Sat Apr 17 13:15:35 2004
@@ -44,12 +44,11 @@
         a21 = a.a2.a21
         a211 = a.a2.a21.a211
 
-        acquired = acquire('a1', (), 'a1;acquire', a211, None)
+        acquired = acquire('a1', a211, None)
 
         self.assertEqual(acquired.name, 'a1')
 
-        self.assertRaises(NotFoundError,
-                          acquire, 'a3', (), 'a1;acquire', a211, None)
+        self.assertRaises(NotFoundError, acquire, 'a3', a211, None)
 
 
 


=== Zope3/src/zope/app/traversing/tests/test_atteritem.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/traversing/tests/test_atteritem.py:1.4	Thu May  1 15:35:38 2003
+++ Zope3/src/zope/app/traversing/tests/test_atteritem.py	Sat Apr 17 13:15:35 2004
@@ -31,11 +31,11 @@
 
     def testAttr(self):
         from zope.app.traversing.namespace import attr
-        self.assertEqual(attr('a', (), 'a;attribute', c, None), 1)
+        self.assertEqual(attr('a', c, None), 1)
 
     def testItem(self):
         from zope.app.traversing.namespace import item
-        self.assertEqual(item('a', (), 'a;item', c, None), 'avalue')
+        self.assertEqual(item('a', c, None), 'avalue')
 
 
 


=== Zope3/src/zope/app/traversing/tests/test_etc.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/traversing/tests/test_etc.py:1.6	Tue Sep  2 16:46:53 2003
+++ Zope3/src/zope/app/traversing/tests/test_etc.py	Sat Apr 17 13:15:35 2004
@@ -28,8 +28,7 @@
              import applicationController, applicationControllerRoot
 
         self.assertEqual(
-            etc('process', (), '++etc++process',
-                applicationControllerRoot, None),
+            etc('process', applicationControllerRoot, None),
             applicationController)
 
     def testServices(self):
@@ -37,7 +36,7 @@
         class C:
             def getSiteManager(self): return 42
 
-        self.assertEqual(etc('site', (), 'etc:site', C(), None), 42)
+        self.assertEqual(etc('site', C(), None), 42)
 
 
 


=== Zope3/src/zope/app/traversing/tests/test_namespacetrversal.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/traversing/tests/test_namespacetrversal.py:1.9	Fri Aug  8 14:07:44 2003
+++ Zope3/src/zope/app/traversing/tests/test_namespacetrversal.py	Sat Apr 17 13:15:35 2004
@@ -28,7 +28,7 @@
 
 c=C()
 
-def noop(name, parameters, pname, ob, request):
+def noop(name, ob, request):
     return ob
 
 
@@ -60,7 +60,12 @@
 
 
 def test_suite():
-    return makeSuite(Test)
+    suite = makeSuite(Test)
+    from doctest import DocTestSuite
+    suite.addTest(DocTestSuite('zope.app.traversing.namespace'))
+    return suite
+
+
 
 
 if __name__ == '__main__':


=== Zope3/src/zope/app/traversing/tests/test_presentation.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/traversing/tests/test_presentation.py:1.7	Mon Mar 15 15:42:10 2004
+++ Zope3/src/zope/app/traversing/tests/test_presentation.py	Sat Apr 17 13:15:35 2004
@@ -47,14 +47,14 @@
         ztapi.browserView(IContent, 'foo', View)
 
         ob = Content()
-        v = view('foo', (), '@@foo', ob, TestRequest())
+        v = view('foo', ob, TestRequest())
         self.assertEqual(v.__class__, View)
 
     def testResource(self):
         ztapi.browserResource('foo', Resource)
 
         ob = Content()
-        r = resource('foo', (), '++resource++foo', ob, TestRequest())
+        r = resource('foo', ob, TestRequest())
         self.assertEqual(r.__class__, Resource)
 
 


=== Zope3/src/zope/app/traversing/tests/test_skin.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/traversing/tests/test_skin.py:1.5	Fri Aug  8 14:07:50 2003
+++ Zope3/src/zope/app/traversing/tests/test_skin.py	Sat Apr 17 13:15:35 2004
@@ -33,7 +33,7 @@
 
         request = FauxRequest()
         ob = object()
-        ob2 = skin('foo', (), '++skin++foo', ob, request)
+        ob2 = skin('foo', ob, request)
         self.assertEqual(ob, ob2)
         self.assertEqual(request.skin, 'foo')
         self.assertEqual(request.shifted, 1)


=== Zope3/src/zope/app/traversing/tests/test_traverser.py 1.18 => 1.19 ===
--- Zope3/src/zope/app/traversing/tests/test_traverser.py:1.18	Sat Mar 13 18:55:28 2004
+++ Zope3/src/zope/app/traversing/tests/test_traverser.py	Sat Apr 17 13:15:35 2004
@@ -210,7 +210,7 @@
         df = DefaultTraversable(root)
 
         further = []
-        next = df.traverse('item', (), 'item', further)
+        next = df.traverse('item', further)
         self.failUnless(next is item)
         self.assertEquals(further, [])
 
@@ -221,14 +221,14 @@
         df = DefaultTraversable(dict)
 
         further = []
-        next = df.traverse('foo', (), 'foo', further)
+        next = df.traverse('foo', further)
         self.failUnless(next is foo)
         self.assertEquals(further, [])
 
     def testNotFound(self):
         df = DefaultTraversable(C('dummy'))
 
-        self.assertRaises(NotFoundError, df.traverse, 'bar', (), 'bar', [])
+        self.assertRaises(NotFoundError, df.traverse, 'bar', [])
 
 def test_suite():
     loader = unittest.TestLoader()


=== Zope3/src/zope/app/traversing/tests/test_vh.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/traversing/tests/test_vh.py:1.2	Fri Aug  8 14:07:55 2003
+++ Zope3/src/zope/app/traversing/tests/test_vh.py	Sat Apr 17 13:15:35 2004
@@ -53,7 +53,7 @@
 
         request = TestRequest(['folder1'], ['folder1_1', '++', 'z', 'y', 'x'])
         ob = object()
-        result = vh('', (), '++vh++', ob, request)
+        result = vh('', ob, request)
 
         self.assertEqual(result, ob)
         self.assertEqual(request._traversal_stack, ['folder1_1'])
@@ -67,8 +67,7 @@
         # GET /folder1/folder2/++vh++http:host:80/folder1_1
         request = TestRequest(['folder1', 'folder2'], ['folder1_1'])
         ob = object()
-        self.assertRaises(ValueError, vh,
-                          'http:host:80', (), '++vh++http:host:80', ob, request)
+        self.assertRaises(ValueError, vh, 'http:host:80', ob, request)
 
 
     def test_vh_host(self):
@@ -76,8 +75,7 @@
 
         request = TestRequest(['folder1'], ['folder1_1', '++'])
         ob = object()
-        result = vh('http:www.fubarco.com:80', (),
-                    '++vh++http:www.fubarco.com:80', ob, request)
+        result = vh('http:www.fubarco.com:80', ob, request)
 
         self.assertEqual(request._app_server, 'http://www.fubarco.com:80')
 




More information about the Zope3-Checkins mailing list