[Zope3-checkins] CVS: Zope3/src/zope/app/browser/tests - test_absoluteurl.py:1.9.12.1 test_menu.py:1.8.18.1 test_undo.py:1.3.12.1 test_objectname.py:NONE
Grégoire Weber
zope@i-con.ch
Sun, 22 Jun 2003 10:24:23 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv24874/src/zope/app/browser/tests
Modified Files:
Tag: cw-mail-branch
test_absoluteurl.py test_menu.py test_undo.py
Removed Files:
Tag: cw-mail-branch
test_objectname.py
Log Message:
Synced up with HEAD
=== Zope3/src/zope/app/browser/tests/test_absoluteurl.py 1.9 => 1.9.12.1 ===
--- Zope3/src/zope/app/browser/tests/test_absoluteurl.py:1.9 Wed Apr 30 19:37:58 2003
+++ Zope3/src/zope/app/browser/tests/test_absoluteurl.py Sun Jun 22 10:22:51 2003
@@ -18,7 +18,7 @@
"""
from unittest import TestCase, main, makeSuite
-from zope.interface import Interface
+from zope.interface import Interface, implements
from zope.app.tests.placelesssetup import PlacelessSetup
from zope.component import getService, getView
@@ -30,13 +30,13 @@
from zope.publisher.http import IHTTPRequest
from zope.publisher.http import HTTPCharsets
from zope.publisher.interfaces.browser import IBrowserPresentation
-from zope.proxy.context import ContextWrapper
+from zope.app.context import ContextWrapper
class IRoot(Interface): pass
class Root:
- __implements__ = IRoot
+ implements(IRoot)
class TrivialContent(object):
"""Trivial content object, used because instances of object are rocks."""
@@ -89,10 +89,10 @@
request = TestRequest()
request.setViewType(IBrowserPresentation)
- content = ContextWrapper(TrivialContent(), Root(), name='a')
- content = ContextWrapper(TrivialContent(), content,
- name='.',
- side_effect_name="++skin++ZopeTop")
+ content = ContextWrapper(TrivialContent(), Root(),
+ name='a',
+ side_effect_names=("++skin++ZopeTop", )
+ )
content = ContextWrapper(TrivialContent(), content, name='b')
content = ContextWrapper(TrivialContent(), content, name='c')
view = getView(content, 'absolute_url', request)
@@ -111,9 +111,8 @@
request.setViewType(IBrowserPresentation)
root = Root()
- content = ContextWrapper(root, root,
- name='.',
- side_effect_name="++skin++ZopeTop")
+ content = ContextWrapper(root, None,
+ side_effect_names=("++skin++ZopeTop", ))
content = ContextWrapper(TrivialContent(), content, name='a')
content = ContextWrapper(TrivialContent(), content, name='b')
content = ContextWrapper(TrivialContent(), content, name='c')
@@ -152,11 +151,12 @@
request.setViewType(IBrowserPresentation)
vh_root = TrivialContent()
- content = ContextWrapper(vh_root, Root(), name='a')
request._vh_root = ContextWrapper(vh_root, Root(), name='a')
- content = ContextWrapper(TrivialContent(), content,
- name='.',
- side_effect_name="++vh++abc")
+
+ content = ContextWrapper(vh_root, Root(),
+ name='a',
+ side_effect_names=("++vh++abc", ),
+ )
content = ContextWrapper(TrivialContent(), content, name='b')
content = ContextWrapper(TrivialContent(), content, name='c')
view = getView(content, 'absolute_url', request)
@@ -175,8 +175,7 @@
root = Root()
request._vh_root = ContextWrapper(root, root, name='')
- content = ContextWrapper(root, root,
- name='.',
+ content = ContextWrapper(root, None,
side_effect_name="++vh++abc")
content = ContextWrapper(TrivialContent(), content, name='a')
content = ContextWrapper(TrivialContent(), content, name='b')
=== Zope3/src/zope/app/browser/tests/test_menu.py 1.8 => 1.8.18.1 ===
--- Zope3/src/zope/app/browser/tests/test_menu.py:1.8 Tue Mar 11 11:10:54 2003
+++ Zope3/src/zope/app/browser/tests/test_menu.py Sun Jun 22 10:22:51 2003
@@ -17,7 +17,7 @@
"""
import unittest
-from zope.interface import Interface
+from zope.interface import Interface, implements
from zope.component import getService, getServiceManager
from zope.app.services.servicenames import Views
@@ -39,7 +39,7 @@
return {'action': action, 'title': title, 'description': ''}
class Service:
- __implements__ = IBrowserMenuService, ISimpleService
+ implements(IBrowserMenuService, ISimpleService)
def getMenu(self, name, ob, req):
return [d('l1', 'a1'),
@@ -48,7 +48,7 @@
class I(Interface): pass
class C:
- __implements__ = I
+ implements(I)
def __call__(self):
pass
@@ -61,7 +61,7 @@
ob.abad.bad = 1
class V:
- __implements__ = IBrowserView
+ implements(IBrowserView)
def __init__(self, context, request):
self.context = context
=== Zope3/src/zope/app/browser/tests/test_undo.py 1.3 => 1.3.12.1 ===
--- Zope3/src/zope/app/browser/tests/test_undo.py:1.3 Wed Apr 30 19:37:58 2003
+++ Zope3/src/zope/app/browser/tests/test_undo.py Sun Jun 22 10:22:51 2003
@@ -19,13 +19,14 @@
from unittest import TestCase, main, makeSuite
+from zope.interface import implements
from zope.app.interfaces.undo import IUndoManager
from zope.app.browser.undo import Undo
from zope.app.services.tests.placefulsetup\
import PlacefulSetup
class TestIUndoManager:
- __implements__ = IUndoManager
+ implements(IUndoManager)
def __init__(self):
dict1 = {'id': '1', 'user_name': 'monkey', 'description': 'thing1',
=== Removed File Zope3/src/zope/app/browser/tests/test_objectname.py ===