[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/tests - test_field_widget.py:1.3

Steve Alexander steve@cat-box.net
Thu, 9 Jan 2003 12:29:14 -0500


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

Modified Files:
	test_field_widget.py 
Log Message:
Renamed ComponentLocation field to ComponentPath field in preparation
for a true ComponentLocation field.


=== Zope3/src/zope/app/browser/services/tests/test_field_widget.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/services/tests/test_field_widget.py:1.2	Wed Dec 25 09:12:38 2002
+++ Zope3/src/zope/app/browser/services/tests/test_field_widget.py	Thu Jan  9 12:28:42 2003
@@ -11,21 +11,20 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""ComponentLocationWidget tests.
+"""ComponentPathWidget tests.
 
 $Id$
 """
 
 from unittest import TestCase, TestSuite, main, makeSuite
-from zope.app.services.tests.placefulsetup \
-     import PlacefulSetup
+from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.traversing import traverse
 from zope.interface import Interface
 from zope.app.services.service import ServiceManager
 from zope.publisher.browser import TestRequest
-from zope.app.browser.services.field import ComponentLocationWidget
+from zope.app.browser.services.field import ComponentPathWidget
 
-class FakeComponentLocation:
+class FakeComponentPath:
 
     default = None
 
@@ -52,8 +51,7 @@
     def test(self):
         self.buildFolders()
         self.rootFolder.setServiceManager(ServiceManager())
-        default = traverse(self.rootFolder,
-                           '++etc++Services/Packages/default')
+        default = traverse(self.rootFolder, '++etc++Services/Packages/default')
         default.setObject('c1', C())
         default.setObject('c2', C())
         default.setObject('c3', C())
@@ -63,8 +61,8 @@
 
         request = TestRequest()
 
-        fake = FakeComponentLocation(default, I1)
-        widget = ComponentLocationWidget(fake, request)
+        fake = FakeComponentPath(default, I1)
+        widget = ComponentPathWidget(fake, request)
 
         expected = (
             '<select name="field.X">\n'
@@ -92,8 +90,8 @@
 
     def test_convert(self):
         request = TestRequest()
-        fake = FakeComponentLocation(None, I1)
-        widget = ComponentLocationWidget(fake, request)
+        fake = FakeComponentPath(None, I1)
+        widget = ComponentPathWidget(fake, request)
         self.assertEqual(widget._convert(u''), None)
         self.assertEqual(widget._convert(u'/a'), u'/a')