[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/tests - test_componentconfigurl.py:1.3 test_field_widget.py:1.6
Jim Fulton
jim@zope.com
Tue, 18 Mar 2003 16:02:51 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/services/tests
In directory cvs.zope.org:/tmp/cvs-serv21177/src/zope/app/browser/services/tests
Modified Files:
test_componentconfigurl.py test_field_widget.py
Log Message:
Removed "Packages" from the object hierarchy in site managers (service
managers). We now traverse directly from site managers to individual
site-management folders.
This change is backward compatible because the underlying data
structures haven't changed.
=== Zope3/src/zope/app/browser/services/tests/test_componentconfigurl.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/services/tests/test_componentconfigurl.py:1.2 Wed Dec 25 09:12:38 2002
+++ Zope3/src/zope/app/browser/services/tests/test_componentconfigurl.py Tue Mar 18 16:02:20 2003
@@ -48,20 +48,18 @@
def test_componentURL(self):
self.buildFolders()
self.rootFolder.setServiceManager(ServiceManager())
- default = traverse(
- self.rootFolder,
- '++etc++Services/Packages/default',
+ default = traverse(self.rootFolder, '++etc++Services/default',
)
default.setObject('c', C())
traverse(default, 'configure').setObject(
'',
ServiceConfiguration('test_service',
- '/++etc++Services/Packages/default/c')
+ '/++etc++Services/default/c')
)
config = traverse(default, 'configure/1')
view = V(config, TestRequest())
self.assertEqual(view.componentURL(),
- 'http://127.0.0.1/++etc++Services/Packages/default/c')
+ 'http://127.0.0.1/++etc++Services/default/c')
def test_componentPath(self):
context = ContextStub('/path/to/me')
=== Zope3/src/zope/app/browser/services/tests/test_field_widget.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/browser/services/tests/test_field_widget.py:1.5 Fri Feb 21 09:53:33 2003
+++ Zope3/src/zope/app/browser/services/tests/test_field_widget.py Tue Mar 18 16:02:20 2003
@@ -60,7 +60,7 @@
PlacefulSetup.setUp(self)
self.buildFolders()
self.rootFolder.setServiceManager(ServiceManager())
- default = traverse(self.rootFolder, '++etc++Services/Packages/default')
+ default = traverse(self.rootFolder, '++etc++Services/default')
default.setObject('c1', C())
default.setObject('c2', C())
default.setObject('c3', C())
@@ -81,22 +81,22 @@
expected = (
'<select name="field.X">'
'<option></option>'
- '<option>/++etc++Services/Packages/default/c1</option>'
- '<option>/++etc++Services/Packages/default/c2</option>'
- '<option>/++etc++Services/Packages/default/c3</option>'
+ '<option>/++etc++Services/default/c1</option>'
+ '<option>/++etc++Services/default/c2</option>'
+ '<option>/++etc++Services/default/c3</option>'
'</select>'
)
self.assertEqual(widget(), expected)
- self.request.form['field.X'] = u'/++etc++Services/Packages/default/c2'
+ self.request.form['field.X'] = u'/++etc++Services/default/c2'
expected = (
'<select name="field.X">'
'<option></option>'
- '<option>/++etc++Services/Packages/default/c1</option>'
- '<option selected>/++etc++Services/Packages/default/c2</option>'
- '<option>/++etc++Services/Packages/default/c3</option>'
+ '<option>/++etc++Services/default/c1</option>'
+ '<option selected>/++etc++Services/default/c2</option>'
+ '<option>/++etc++Services/default/c3</option>'
'</select>'
)
@@ -139,9 +139,9 @@
'path: '
'<select name="field.X.p">'
'<option></option>'
- '<option>/++etc++Services/Packages/default/c1</option>'
- '<option>/++etc++Services/Packages/default/c2</option>'
- '<option>/++etc++Services/Packages/default/c3</option>'
+ '<option>/++etc++Services/default/c1</option>'
+ '<option>/++etc++Services/default/c2</option>'
+ '<option>/++etc++Services/default/c3</option>'
'</select>'
'<br>'
'dotted name: '
@@ -153,15 +153,15 @@
self.assertEqual(widget.hidden(), '')
self.request.form['field.X.p'] = (
- u'/++etc++Services/Packages/default/c2')
+ u'/++etc++Services/default/c2')
expected = (
'path: '
'<select name="field.X.p">'
'<option></option>'
- '<option>/++etc++Services/Packages/default/c1</option>'
- '<option selected>/++etc++Services/Packages/default/c2</option>'
- '<option>/++etc++Services/Packages/default/c3</option>'
+ '<option>/++etc++Services/default/c1</option>'
+ '<option selected>/++etc++Services/default/c2</option>'
+ '<option>/++etc++Services/default/c3</option>'
'</select>'
'<br>'
'dotted name: '
@@ -172,7 +172,7 @@
self.failUnless(widget.haveData())
self.assertEqual(widget.hidden(),
'<input type="hidden" name="field.X.p" value="'
- '/++etc++Services/Packages/default/c2'
+ '/++etc++Services/default/c2'
'" />'
)
@@ -191,9 +191,9 @@
'path: '
'<select name="field.X.p">'
'<option></option>'
- '<option>/++etc++Services/Packages/default/c1</option>'
- '<option>/++etc++Services/Packages/default/c2</option>'
- '<option>/++etc++Services/Packages/default/c3</option>'
+ '<option>/++etc++Services/default/c1</option>'
+ '<option>/++etc++Services/default/c2</option>'
+ '<option>/++etc++Services/default/c3</option>'
'</select>'
'<br>'
'dotted name: '