[Zope3-checkins]
SVN: Zope3/branches/srichter-blow-services/src/zope/app/
Started fixing functional tests.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Jan 12 15:37:45 EST 2005
Log message for revision 28816:
Started fixing functional tests.
Changed:
U Zope3/branches/srichter-blow-services/src/zope/app/apidoc/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/apidoc/classmodule/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/apidoc/ifacemodule/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/apidoc/utilitymodule/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/apidoc/viewmodule/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/apidoc/zcmlmodule/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/applicationcontrol/browser/ftests/test_translationdomaincontrol.py
U Zope3/branches/srichter-blow-services/src/zope/app/applicationcontrol/browser/ftests/test_zodbcontrol.py
U Zope3/branches/srichter-blow-services/src/zope/app/catalog/browser/README.txt
U Zope3/branches/srichter-blow-services/src/zope/app/catalog/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_services.py
U Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_tasks.py
U Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_toolsoverview.py
U Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_utilitytools.py
D Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/utility/browser/ftests.py
A Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/utility/browser/xxx_ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/component/browser/xxx_tests/test_directives.py
U Zope3/branches/srichter-blow-services/src/zope/app/component/browser/xxx_tests/test_editregistration.py
U Zope3/branches/srichter-blow-services/src/zope/app/component/vocabulary.py
U Zope3/branches/srichter-blow-services/src/zope/app/container/browser/ftests/test_contents.py
U Zope3/branches/srichter-blow-services/src/zope/app/container/ftests/test_view_permissions.py
U Zope3/branches/srichter-blow-services/src/zope/app/dav/ftests/dav.py
U Zope3/branches/srichter-blow-services/src/zope/app/demo/insensitivefolder/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/demo/pagelet/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/demo/pageletchooser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/dtmlpage/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/exception/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/file/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/file/ftests/test_file.py
U Zope3/branches/srichter-blow-services/src/zope/app/file/ftests/test_image.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_booleanradiowidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_checkboxwidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_datetimewidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_editview.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_filewidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_floatwidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_intwidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_objectwidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_textareawidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_textwidget.py
U Zope3/branches/srichter-blow-services/src/zope/app/ftests/test_functional.py
U Zope3/branches/srichter-blow-services/src/zope/app/ftests/test_introspector.py
U Zope3/branches/srichter-blow-services/src/zope/app/generations/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/intid/browser/configure.zcml
U Zope3/branches/srichter-blow-services/src/zope/app/intid/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/intid/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/observable/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/onlinehelp/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/pau/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/presentation/xxx_Tests/test_presentation.py
U Zope3/branches/srichter-blow-services/src/zope/app/publication/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/publication/traversers.py
U Zope3/branches/srichter-blow-services/src/zope/app/publication/zopepublication.py
U Zope3/branches/srichter-blow-services/src/zope/app/publisher/browser/__init__.py
U Zope3/branches/srichter-blow-services/src/zope/app/publisher/browser/tests/test_directives.py
U Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/README.txt
U Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/__init__.py
U Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/metaconfigure.py
U Zope3/branches/srichter-blow-services/src/zope/app/rotterdam/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/securitypolicy/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/session/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/sqlscript/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/testing/functional.py
U Zope3/branches/srichter-blow-services/src/zope/app/testing/test.py
U Zope3/branches/srichter-blow-services/src/zope/app/traversing/ftests/test_vhosting.py
U Zope3/branches/srichter-blow-services/src/zope/app/workflow/definition.py
U Zope3/branches/srichter-blow-services/src/zope/app/workflow/stateful/browser/ftests/test_contentworkflowsmanager.py
U Zope3/branches/srichter-blow-services/src/zope/app/workflow/stateful/browser/ftests/test_processdefinition.py
U Zope3/branches/srichter-blow-services/src/zope/app/zapi/__init__.py
U Zope3/branches/srichter-blow-services/src/zope/app/zapi/interfaces.py
U Zope3/branches/srichter-blow-services/src/zope/app/zopetop/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/zptpage/browser/ftests.py
U Zope3/branches/srichter-blow-services/src/zope/app/zptpage/zptpage.py
-=-
Modified: Zope3/branches/srichter-blow-services/src/zope/app/apidoc/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/apidoc/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/apidoc/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id$
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class APIDocTests(BrowserTestCase):
"""Just a couple of tests ensuring that the templates render."""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/apidoc/classmodule/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/apidoc/classmodule/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/apidoc/classmodule/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id$
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class ClassModuleTests(BrowserTestCase):
"""Just a couple of tests ensuring that the templates render."""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/apidoc/ifacemodule/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/apidoc/ifacemodule/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/apidoc/ifacemodule/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id$
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class InterfaceModuleTests(BrowserTestCase):
"""Just a couple of tests ensuring that the templates render."""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/apidoc/utilitymodule/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/apidoc/utilitymodule/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/apidoc/utilitymodule/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id$
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class UtilityModuleTests(BrowserTestCase):
"""Just a couple of tests ensuring that the templates render."""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/apidoc/viewmodule/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/apidoc/viewmodule/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/apidoc/viewmodule/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id$
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class ViewModuleTests(BrowserTestCase):
"""Just a couple of tests ensuring that the templates render."""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/apidoc/zcmlmodule/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/apidoc/zcmlmodule/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/apidoc/zcmlmodule/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id$
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class ZCMLModuleTests(BrowserTestCase):
"""Just a couple of tests ensuring that the templates render."""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/applicationcontrol/browser/ftests/test_translationdomaincontrol.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/applicationcontrol/browser/ftests/test_translationdomaincontrol.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/applicationcontrol/browser/ftests/test_translationdomaincontrol.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id$
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class ZODBControlTest(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/applicationcontrol/browser/ftests/test_zodbcontrol.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/applicationcontrol/browser/ftests/test_zodbcontrol.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/applicationcontrol/browser/ftests/test_zodbcontrol.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,7 +17,7 @@
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class ZODBControlTest(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/catalog/browser/README.txt
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/catalog/browser/README.txt 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/catalog/browser/README.txt 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,11 +17,11 @@
objects. Before creating a catalog, you must create a intid tool:
>>> print http(r"""
- ... POST /++etc++site/default/AddUtility/action.html HTTP/1.1
+ ... POST /++etc++site/default/@@+/action.html HTTP/1.1
... Authorization: Basic bWdyOm1ncnB3
... Content-Length: 78
... Content-Type: application/x-www-form-urlencoded
- ... Referer: http://localhost:8081/++etc++site/default/AddUtility
+ ... Referer: http://localhost:8081/++etc++site/default/@@+
...
... type_name=BrowserAdd__zope.app.intid.IntIds&id=&add=+Add+""")
HTTP/1.1 303 ...
@@ -83,11 +83,11 @@
Once we have a unique-id tool, you can add a catalog:
>>> print http(r"""
- ... POST /++etc++site/default/AddUtility/action.html HTTP/1.1
+ ... POST /++etc++site/default/@@+/action.html HTTP/1.1
... Authorization: Basic bWdyOm1ncnB3
... Content-Length: 77
... Content-Type: application/x-www-form-urlencoded
- ... Referer: http://localhost:8081/++etc++site/default/AddUtility
+ ... Referer: http://localhost:8081/++etc++site/default/@@+
...
... type_name=BrowserAdd__zope.app.catalog.catalog.Catalog&id=&add=+Add+""")
HTTP/1.1 303 ...
Modified: Zope3/branches/srichter-blow-services/src/zope/app/catalog/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/catalog/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/catalog/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -15,9 +15,9 @@
$Id: ftests.py 27323 2004-08-28 19:31:22Z jim $
"""
+from zope.app.testing.functional import FunctionalDocFileSuite
def test_suite():
- from zope.app.tests.functional import FunctionalDocFileSuite
return FunctionalDocFileSuite('README.txt')
if __name__ == '__main__':
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_services.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_services.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_services.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,7 +17,7 @@
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class TestServices(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_tasks.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_tasks.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_tasks.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,7 +17,7 @@
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class TasksTest(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_toolsoverview.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_toolsoverview.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_toolsoverview.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,7 +17,7 @@
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class TestToolsOverview(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_utilitytools.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_utilitytools.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/site/browser/xxx_ftests/test_utilitytools.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -20,7 +20,7 @@
from zope.app import zapi
from zope.i18n.interfaces import ITranslationDomain
from zope.app.registration.interfaces import ActiveStatus, RegisteredStatus
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class TestUtilityTool(BrowserTestCase):
Deleted: Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/utility/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/utility/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/utility/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -1,57 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Tests for zope.app.utility.browser."""
-
-import unittest
-
-import transaction
-
-import zope.app.securitypolicy.interfaces
-import zope.app.securitypolicy.role
-
-from zope.app import zapi
-
-from zope.app.tests import functional
-
-
-class UtilityViewTestCase(functional.BrowserTestCase):
-
- def test_utilities_view(self):
- # need to add and activate a role utility
- root = self.getRootFolder()
- default = zapi.traverse(root, "/++etc++site/default")
- role = zope.app.securitypolicy.role.PersistentRole("my-sample-role")
- default["my-role"] = role
- reg = zope.app.securitypolicy.role.RoleRegistration(
- "my-role-registration",
- zope.app.securitypolicy.interfaces.IRole,
- default["my-role"])
- rm = default.getRegistrationManager()
- rm.addRegistration(reg)
- reg.status = "Active"
- transaction.get_transaction().commit()
- # now let's take a look at the Utilities page:
- response = self.publish(
- "/++etc++site/default/Utilities/@@utilities.html",
- basic="mgr:mgrpw")
- self.assertEqual(response.getStatus(), 200)
-
-
-def test_suite():
- suite = unittest.makeSuite(UtilityViewTestCase)
- suite.addTest(functional.FunctionalDocFileSuite("utilities.txt"))
- return suite
-
-if __name__ == "__main__":
- unittest.main(defaultTest="test_suite")
Copied: Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/utility/browser/xxx_ftests.py (from rev 28806, Zope3/branches/srichter-blow-services/src/zope/app/component/bbb/utility/browser/ftests.py)
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/browser/xxx_tests/test_directives.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/browser/xxx_tests/test_directives.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/browser/xxx_tests/test_directives.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -19,7 +19,7 @@
from zope.interface import Interface
from zope.testing.doctestunit import DocTestSuite
-from zope.app.tests.placelesssetup import setUp, tearDown
+from zope.app.testing.placelesssetup import setUp, tearDown
class FauxContext(object):
def __init__(self):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/browser/xxx_tests/test_editregistration.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/browser/xxx_tests/test_editregistration.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/browser/xxx_tests/test_editregistration.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -15,7 +15,7 @@
$Id$
"""
-from zope.app.tests import ztapi
+from zope.app.testing import ztapi
from unittest import TestCase, TestSuite, main, makeSuite
from zope.app.registration.browser import EditRegistration
from zope.app.container.interfaces import IContainer
Modified: Zope3/branches/srichter-blow-services/src/zope/app/component/vocabulary.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/component/vocabulary.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/component/vocabulary.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -79,7 +79,7 @@
Now we register some utilities for IObject
- >>> from zope.app.tests import ztapi
+ >>> from zope.app.testing import ztapi
>>> object1 = Object('object1')
>>> ztapi.provideUtility(IObject, object1, 'object1')
>>> object2 = Object('object2')
@@ -290,8 +290,8 @@
>>> IVocabularyTokenized.providedBy(vocab)
True
- >>> from zope.app.tests import placelesssetup
- >>> from zope.app.tests import ztapi
+ >>> from zope.app.testing import placelesssetup
+ >>> from zope.app.testing import ztapi
>>> placelesssetup.setUp()
>>> ztapi.provideUtility(IMyUtility, MyUtility(), 'one')
Modified: Zope3/branches/srichter-blow-services/src/zope/app/container/browser/ftests/test_contents.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/container/browser/ftests/test_contents.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/container/browser/ftests/test_contents.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -20,15 +20,15 @@
from persistent import Persistent
from transaction import get_transaction
-from zope.app.tests.functional import BrowserTestCase
from zope.interface import implements
from zope.app import zapi
from zope.app.annotation.interfaces import IAttributeAnnotatable
from zope.app.container.interfaces import IReadContainer, IContained
from zope.app.dublincore.interfaces import IZopeDublinCore
+from zope.app.testing.functional import BrowserTestCase
+from zope.app.testing.functional import FunctionalDocFileSuite
-from zope.app.tests.functional import FunctionalDocFileSuite
class File(Persistent):
implements(IAttributeAnnotatable)
Modified: Zope3/branches/srichter-blow-services/src/zope/app/container/ftests/test_view_permissions.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/container/ftests/test_view_permissions.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/container/ftests/test_view_permissions.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -20,7 +20,7 @@
from zope.security.interfaces import Unauthorized
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.file import File
from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.securitypolicy.interfaces import IRolePermissionManager
Modified: Zope3/branches/srichter-blow-services/src/zope/app/dav/ftests/dav.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/dav/ftests/dav.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/dav/ftests/dav.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -18,7 +18,7 @@
from persistent import Persistent
from transaction import get_transaction
from zope.interface import implements
-from zope.app.tests.functional import HTTPTestCase
+from zope.app.testing.functional import HTTPTestCase
from zope.app.folder import Folder
from zope.app.annotation.interfaces import IAttributeAnnotatable
Modified: Zope3/branches/srichter-blow-services/src/zope/app/demo/insensitivefolder/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/demo/insensitivefolder/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/demo/insensitivefolder/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,8 +16,8 @@
$Id$
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
from zope.publisher.interfaces import NotFound
+from zope.app.testing.functional import BrowserTestCase
class TestCaseInsensitiveFolder(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/demo/pagelet/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/demo/pagelet/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/demo/pagelet/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -13,12 +13,11 @@
##############################################################################
"""Functional tests for testing pagelet content.
-$Id:$
+$Id$
"""
-
import unittest
-from zope.app.tests.functional import BrowserTestCase
from zope.publisher.interfaces import NotFound
+from zope.app.testing.functional import BrowserTestCase
class TestPageletContent(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/demo/pageletchooser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/demo/pageletchooser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/demo/pageletchooser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -13,12 +13,11 @@
##############################################################################
"""Functional tests for testing pagelet chooser content.
-$Id:$
+$Id$
"""
-
import unittest
-from zope.app.tests.functional import BrowserTestCase
from zope.publisher.interfaces import NotFound
+from zope.app.testing.functional import BrowserTestCase
class TestPageletChooserContent(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/dtmlpage/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/dtmlpage/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/dtmlpage/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id: ftests.py 25177 2004-06-02 13:17:31Z jim $
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.dtmlpage.dtmlpage import DTMLPage
from xml.sax.saxutils import escape
Modified: Zope3/branches/srichter-blow-services/src/zope/app/exception/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/exception/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/exception/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,7 +17,7 @@
"""
import unittest
from zope.publisher.interfaces import NotFound
-from zope.app.tests import functional
+from zope.app.testing import functional
class TestNotFound(functional.BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/file/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/file/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/file/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -19,7 +19,7 @@
from xml.sax.saxutils import escape
from StringIO import StringIO
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.file.file import File
from zope.app.file.image import Image
from zope.app.file.tests.test_image import zptlogo
Modified: Zope3/branches/srichter-blow-services/src/zope/app/file/ftests/test_file.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/file/ftests/test_file.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/file/ftests/test_file.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,7 +17,7 @@
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class TestFile(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/file/ftests/test_image.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/file/ftests/test_image.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/file/ftests/test_image.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -19,7 +19,7 @@
import cgi
from cStringIO import StringIO
from transaction import get_transaction
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.publisher.browser import FileUpload
from zope.app.file.image import Image
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_booleanradiowidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_booleanradiowidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_booleanradiowidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -28,7 +28,7 @@
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class IFoo(Interface):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_checkboxwidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_checkboxwidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_checkboxwidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -28,7 +28,7 @@
from support import *
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class IBoolTest(Interface):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_datetimewidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_datetimewidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_datetimewidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -30,7 +30,7 @@
from support import *
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class IDatetimeTest(Interface):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_editview.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_editview.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_editview.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -27,7 +27,7 @@
from support import *
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class IFoo(Interface):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_filewidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_filewidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_filewidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -31,7 +31,7 @@
from support import *
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.form.interfaces import IInputWidget
class IFileField(IField):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_floatwidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_floatwidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_floatwidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -28,7 +28,7 @@
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class IFloatTest(Interface):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_intwidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_intwidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_intwidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -28,7 +28,7 @@
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class IIntTest(Interface):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_objectwidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_objectwidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_objectwidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -21,7 +21,7 @@
from zope.publisher.browser import TestRequest
from zope.schema import Object, TextLine
from zope.app.form.browser import ObjectWidget
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.form.browser.tests import support
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_textareawidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_textareawidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_textareawidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -27,7 +27,7 @@
from support import *
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class ITextTest(Interface):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_textwidget.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_textwidget.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/form/browser/ftests/test_textwidget.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -25,7 +25,7 @@
from support import *
from zope.app.traversing.api import traverse
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class ITextLineTest(Interface):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/ftests/test_functional.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/ftests/test_functional.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/ftests/test_functional.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -19,8 +19,8 @@
import unittest
import transaction
-from zope.app.tests.functional import SampleFunctionalTest, BrowserTestCase
-from zope.app.tests.functional import FunctionalDocFileSuite
+from zope.app.testing.functional import SampleFunctionalTest, BrowserTestCase
+from zope.app.testing.functional import FunctionalDocFileSuite
class CookieFunctionalTest(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/ftests/test_introspector.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/ftests/test_introspector.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/ftests/test_introspector.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -18,7 +18,7 @@
__docformat__ = 'restructuredtext'
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class TestIntrospector(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/generations/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/generations/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/generations/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,12 +17,11 @@
"""
import unittest
-from zope.app.tests import ztapi
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing import ztapi, functional
from zope.app.generations.generations import SchemaManager, generations_key
from zope.app.generations.interfaces import ISchemaManager
-class TestDatabaseSchema(BrowserTestCase):
+class TestDatabaseSchema(functional.BrowserTestCase):
def test(self):
BrowserTestCase.setUp(self)
Modified: Zope3/branches/srichter-blow-services/src/zope/app/intid/browser/configure.zcml
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/intid/browser/configure.zcml 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/intid/browser/configure.zcml 2005-01-12 20:37:44 UTC (rev 28816)
@@ -13,7 +13,7 @@
title="Unique Id Utility"
description="A utility that provides unique ids to objects"
class="zope.app.intid.IntIds"
- permission="zope.ManageServices"
+ permission="zope.ManageSite"
/>
<page
Modified: Zope3/branches/srichter-blow-services/src/zope/app/intid/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/intid/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/intid/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -11,14 +11,14 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""XXX short summary goes here.
+"""Int Id Utility Functional Tests
$Id$
"""
import unittest
+from zope.app.testing import functional
def test_suite():
- from zope.app.tests import functional
return unittest.TestSuite((
functional.FunctionalDocFileSuite('tracking.txt'),
))
Modified: Zope3/branches/srichter-blow-services/src/zope/app/intid/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/intid/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/intid/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -15,15 +15,13 @@
$Id$
"""
-
import unittest
import re
from transaction import commit
from zope.app import zapi
-from zope.app.tests import ztapi
-from zope.app.tests.setup import addUtility
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing import ztapi, setup
+from zope.app.testing.functional import BrowserTestCase
class TestIntIds(BrowserTestCase):
@@ -38,7 +36,7 @@
root = self.getRootFolder()
sm = zapi.traverse(root, '/++etc++site')
- addUtility(sm, 'intid', IIntIds, IntIds())
+ setup.addUtility(sm, 'intid', IIntIds, IntIds())
commit()
type_name = 'BrowserAdd__zope.app.intid.IntIds'
Modified: Zope3/branches/srichter-blow-services/src/zope/app/observable/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/observable/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/observable/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -1,3 +1,22 @@
+##############################################################################
+#
+# Copyright (c) 2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Observable tests
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
import unittest
from persistent import Persistent
from zope.interface import implements
@@ -2,3 +21,3 @@
from zope.app.annotation.interfaces import IAttributeAnnotatable
-from zope.app.tests.functional import FunctionalDocFileSuite
+from zope.app.testing.functional import FunctionalDocFileSuite
Modified: Zope3/branches/srichter-blow-services/src/zope/app/onlinehelp/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/onlinehelp/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/onlinehelp/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -21,7 +21,7 @@
from zope.app.folder.interfaces import IRootFolder
from zope.app.file import File
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.onlinehelp.tests.test_onlinehelp import testdir
from zope.app.onlinehelp import help
Modified: Zope3/branches/srichter-blow-services/src/zope/app/pau/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/pau/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/pau/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,9 +16,9 @@
$Id$
"""
import unittest
+from zope.app.testing import functional
def test_suite():
- from zope.app.tests import functional
return unittest.TestSuite((
functional.FunctionalDocFileSuite('principalfolder.txt'),
functional.FunctionalDocFileSuite('groupfolder.txt'),
Modified: Zope3/branches/srichter-blow-services/src/zope/app/presentation/xxx_Tests/test_presentation.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/presentation/xxx_Tests/test_presentation.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/presentation/xxx_Tests/test_presentation.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -36,7 +36,7 @@
from zope.app.presentation.presentation import IPageRegistration
from zope.app.presentation.presentation import PageRegistrationAddSubscriber
from zope.app.presentation.presentation import PageRegistrationRemoveSubscriber
-from zope.app.tests import setup
+from zope.app.testing import setup
from zope.app.traversing.api import traverse
from zope.component.exceptions import ComponentLookupError
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publication/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publication/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publication/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,9 +16,9 @@
$Id$
"""
import unittest
+from zope.app.testing import functional
def test_suite():
- from zope.app.tests import functional
return unittest.TestSuite((
functional.FunctionalDocFileSuite('notfound.txt'),
))
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publication/traversers.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publication/traversers.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publication/traversers.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -18,7 +18,6 @@
__docformat__ = 'restructuredtext'
from zope.app import zapi
-from zope.component.interfaces import IDefaultViewName
from zope.interface import providedBy, implements
from zope.publisher.interfaces import Unauthorized, NotFound
from zope.publisher.interfaces.browser import IBrowserPublisher
@@ -56,8 +55,7 @@
def browserDefault(self, request):
ob = self.context
- view_name = zapi.getSiteManager().adapters.lookup(
- map(providedBy, (ob, request)), IDefaultViewName)
+ view_name = zapi.getDefaultViewName(ob, request)
view = self.publishTraverse(request, view_name)
if hasattr(view, 'browserDefault'):
view, path = view.browserDefault(request)
@@ -80,8 +78,7 @@
ob = self.context
if providedBy(ob):
- view_name = zapi.getSiteManager().adapters.lookup(
- map(providedBy, (ob, request)), IDefaultViewName)
+ view_name = zapi.getDefaultViewName(ob, request)
return ob, (("@@%s" % view_name),)
return ob, ()
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publication/zopepublication.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publication/zopepublication.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publication/zopepublication.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -27,7 +27,6 @@
from zope.event import notify
from zope.security.interfaces import Unauthorized
from zope.component.exceptions import ComponentLookupError
-from zope.component.interfaces import IDefaultViewName
from zope.interface import implements, providedBy
from zope.publisher.publish import mapply
from zope.publisher.interfaces import Retry, IExceptionSideEffects
@@ -295,8 +294,7 @@
# Give the exception instance its location and look up the
# view.
exception = LocationProxy(exc_info[1], loc, '')
- name = zapi.getSiteManager().adapters.lookup(
- map(providedBy, (exception, request)), IDefaultViewName)
+ name = zapi.getDefaultViewName(exception, request)
if name is not None:
view = zapi.queryMultiAdapter(
(exception, request), name=name)
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publisher/browser/__init__.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publisher/browser/__init__.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publisher/browser/__init__.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -15,20 +15,71 @@
$Id$
"""
+from zope.component.interfaces import ComponentLookupError, IDefaultViewName
+from zope.component import getSiteManager
+
+import zope.interface
from zope.interface import implements, directlyProvidedBy, directlyProvides
from zope.app.location import Location
from zope.app.publisher.interfaces.browser import IBrowserView
from zope.publisher.interfaces.browser import ISkin
+# XXX: needs testing of __parent__ property
class BrowserView(Location):
implements(IBrowserView)
def __init__(self, context, request):
self.context = context
self.request = request
- self.__parent__ = context
+ def __getParent(self):
+ return hasattr(self, '_parent') and self._parent or self.context
+ def __setParent(self, parent):
+ self._parent = parent
+
+ __parent__ = property(__getParent, __setParent)
+
+
+class IDefaultViewNameAPI(zope.interface.Interface):
+
+ def getDefaultViewName(object, request, context=None):
+ """Get the name of the default view for the object and request.
+
+ The request must implement IPresentationRequest, and provides the
+ desired view type. The nearest one to the object is found.
+ If a matching default view name cannot be found, raises
+ ComponentLookupError.
+
+ If context is not specified, attempts to use
+ object to specify a context.
+ """
+
+ def queryDefaultViewName(object, request, default=None, context=None):
+ """Look for the name of the default view for the object and request.
+
+ The request must implement IPresentationRequest, and provides
+ the desired view type. The nearest one to the object is
+ found. If a matching default view name cannot be found,
+ returns the default.
+
+ If context is not specified, attempts to use object to specify
+ a context.
+ """
+
+# XXX: needs tests
+def getDefaultViewName(object, request, context=None):
+ name = queryDefaultViewName(object, request, context=context)
+ if name is not None:
+ return name
+ raise ComponentLookupError("Couldn't find default view name",
+ context, request)
+
+def queryDefaultViewName(object, request, default=None, context=None):
+ name = getSiteManager(context).adapters.lookup(
+ map(zope.interface.providedBy, (object, request)), IDefaultViewName)
+ return name or default
+
def applySkin(request, skin):
"""Change the presentation skin for this request.
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publisher/browser/tests/test_directives.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publisher/browser/tests/test_directives.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publisher/browser/tests/test_directives.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -22,7 +22,6 @@
from zope.interface import Interface, implements, directlyProvides, providedBy
import zope.security.management
-from zope.component.interfaces import IDefaultViewName
from zope.configuration.xmlconfig import xmlconfig, XMLConfig
from zope.configuration.exceptions import ConfigurationError
from zope.publisher.browser import TestRequest
@@ -247,9 +246,7 @@
'''
)))
- self.assertEqual(
- zapi.getSiteManager().adapters.lookup(
- map(providedBy, (ob, request)), IDefaultViewName), 'test')
+ self.assertEqual(zapi.getDefaultViewName(ob, request), 'test')
def testSkinResource(self):
self.assertEqual(
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/README.txt
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/README.txt 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/README.txt 2005-01-12 20:37:44 UTC (rev 28816)
@@ -12,10 +12,6 @@
Let's write a view that returns a folder listing:
>>> class FolderListing:
- ... def __init__(self, context, request):
- ... self.context = context
- ... self.request = request
- ...
... def contents(self):
... return list(self.context.keys())
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/__init__.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/__init__.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/__init__.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -24,18 +24,17 @@
class XMLRPCView(object):
"""A base XML-RPC view that can be used as mix-in for XML-RPC views."""
-
zope.interface.implements(zope.app.publisher.interfaces.xmlrpc.IXMLRPCView)
def __init__(self, context, request):
self.context = context
self.request = request
-
class IMethodPublisher(zope.interface.Interface):
"""Marker interface for an object that wants to publish methods
"""
+# Need to test new __parent__ attribute
class MethodPublisher(XMLRPCView, zope.app.location.Location):
"""Base class for very simple XML-RPC views that publish methods
@@ -43,9 +42,17 @@
This example is explained in the README.txt file for this package
"""
-
zope.interface.implements(IMethodPublisher)
+ def __getParent(self):
+ return hasattr(self, '_parent') and self._parent or self.context
+
+ def __setParent(self, parent):
+ self._parent = parent
+
+ __parent__ = property(__getParent, __setParent)
+
+
class MethodTraverser(object):
zope.interface.implements(
zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher)
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -19,7 +19,7 @@
import zope.interface
import zope.app.folder.folder
import zope.publisher.interfaces.xmlrpc
-from zope.app.tests import ztapi
+from zope.app.testing import ztapi, functional
# Evil hack to make pickling work with classes defined in doc tests
class NoCopyDict(dict):
@@ -68,8 +68,7 @@
del sys.modules[name]
def test_suite():
- from zope.app.tests.functional import FunctionalDocFileSuite
- return FunctionalDocFileSuite(
+ return functional.FunctionalDocFileSuite(
'README.txt',
setUp=setUp, tearDown=tearDown, globs=globs)
Modified: Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/metaconfigure.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/metaconfigure.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/publisher/xmlrpc/metaconfigure.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -22,9 +22,9 @@
from zope.publisher.interfaces.xmlrpc import IXMLRPCRequest
from zope.app import zapi
-from zope.app.location import Location
from zope.app.component.interface import provideInterface
from zope.app.component.metaconfigure import handler
+from zope.app.publisher.xmlrpc import MethodPublisher
def view(_context, for_=None, interface=None, methods=None,
class_=None, permission=None, name=None):
@@ -50,6 +50,14 @@
args = ('', for_)
)
+ # Make sure that the class inherits MethodPublisher, so that the views
+ # have a location
+ # XXX: Needs tests
+ if class_ is None:
+ class_ = MethodPublisher
+ else:
+ class_ = type(class_.__name__, (class_, MethodPublisher), {})
+
if name:
# Register a single view
@@ -80,12 +88,10 @@
checker = None
for name in require:
- # create a new callable class with a security checker; mix
- # in zope.app.location.Location so that the view inherits
- # a security context
+ # create a new callable class with a security checker;
cdict = {'__Security_checker__': checker,
'__call__': getattr(class_, name)}
- new_class = type(class_.__name__, (class_, Location), cdict)
+ new_class = type(class_.__name__, (class_,), cdict)
_context.action(
discriminator = ('view', for_, name, IXMLRPCRequest),
callable = handler,
Modified: Zope3/branches/srichter-blow-services/src/zope/app/rotterdam/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/rotterdam/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/rotterdam/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -15,7 +15,7 @@
"""
import unittest
from xml.dom import minidom
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class TestNavTree(BrowserTestCase):
@@ -45,7 +45,7 @@
#add a site manager This will break when site adding is fixed
# see above for examples to fix by filling out a form
# when further action is required to make a site
- response = self.publish("/First/somesite/addServiceManager.html",
+ response = self.publish("/First/somesite/addSiteManager.html",
basic='mgr:mgrpw')
self.assertEqual(response.getStatus(), 302)
# /First/FirstsFolder/@@singleBranchTree.xml
Modified: Zope3/branches/srichter-blow-services/src/zope/app/securitypolicy/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/securitypolicy/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/securitypolicy/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,9 +16,9 @@
$Id: ftests.py 25177 2004-06-02 13:17:31Z jim $
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing import functional
-class RolePermissionsTest(BrowserTestCase):
+class RolePermissionsTest(functional.BrowserTestCase):
def testAllRolePermissionsForm(self):
response = self.publish(
@@ -85,10 +85,9 @@
'''
def test_suite():
- import zope.app.tests.functional
return unittest.TestSuite((
unittest.makeSuite(RolePermissionsTest),
- zope.app.tests.functional.FunctionalDocFileSuite('granting_ftest.txt'),
+ functional.FunctionalDocFileSuite('granting_ftest.txt'),
))
if __name__ == '__main__':
Modified: Zope3/branches/srichter-blow-services/src/zope/app/session/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/session/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/session/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id: tests.py 26427 2004-07-12 16:05:02Z Zen $
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.zptpage.zptpage import ZPTPage
class ZPTSessionTest(BrowserTestCase):
Modified: Zope3/branches/srichter-blow-services/src/zope/app/sqlscript/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/sqlscript/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/sqlscript/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id: ftests.py 25177 2004-06-02 13:17:31Z jim $
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.sqlscript.sqlscript import SQLScript
from xml.sax.saxutils import escape
Modified: Zope3/branches/srichter-blow-services/src/zope/app/testing/functional.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/testing/functional.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/testing/functional.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -90,7 +90,7 @@
def _getDefaultSkin():
"""Returns the current default skin as an interface."""
- adapters = zapi.getService(zapi.servicenames.Adapters)
+ adapters = zapi.getSiteManager().adapters
skin = adapters.lookup((IBrowserRequest,), IDefaultSkin, '')
return skin or IDefaultBrowserLayer
@@ -122,8 +122,8 @@
if not self._init:
# Make sure unit tests are cleaned up
- zope.app.tests.setup.placefulSetUp()
- zope.app.tests.setup.placefulTearDown()
+ zope.app.testing.setup.placefulSetUp()
+ zope.app.testing.setup.placefulTearDown()
if not config_file:
config_file = 'ftesting.zcml'
@@ -143,7 +143,17 @@
# strang FunctionalTestSetup is. Later, when we
# have time, we should clean up this (perhaps with an
# event) and clean up FunctionalTestSetup.
+
response = http(grant_request, handle_errors=False)
+
+ # XXX: Remove?
+ #from zope.app.securitypolicy.interfaces import IPrincipalRoleManager
+ #root = self.db.open().root()[ZopePublication.root_name]
+ #principal_roles = IPrincipalRoleManager(root)
+ #principal_roles.assignRoleToPrincipal('zope.Manager', 'zope.mgr')
+ #commit()
+ #self.db.close()
+
FunctionalTestSetup().connection = None
elif config_file and config_file != self._config_file:
@@ -191,7 +201,6 @@
def tearDown(self):
"""Cleans up after a functional test case."""
-
FunctionalTestSetup().tearDown()
super(FunctionalTestCase, self).tearDown()
Modified: Zope3/branches/srichter-blow-services/src/zope/app/testing/test.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/testing/test.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/testing/test.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -88,7 +88,7 @@
--skip-unit
Run functional tests but not unit tests.
Note that functional tests will be skipped if the module
- zope.app.tests.functional cannot be imported.
+ zope.app.testing.functional cannot be imported.
Functional tests also expect to find the file ftesting.zcml,
which is used to configure the functional-test run.
@@ -96,7 +96,7 @@
DEPRECATED. Run both unit and functional tests.
This option is deprecated, because this is the new default mode.
Note that functional tests will be skipped if the module
- zope.app.tests.functional cannot be imported.
+ zope.app.testing.functional cannot be imported.
-g threshold
--gc-threshold threshold
@@ -853,7 +853,7 @@
# parent directory
config_file = os.path.join('..', FTESTING)
print "Parsing %s" % config_file
- from zope.app.tests.functional import FunctionalTestSetup
+ from zope.app.testing.functional import FunctionalTestSetup
FunctionalTestSetup(config_file)
numbad = 0
@@ -1173,11 +1173,11 @@
# work right.
## if functional:
## try:
-## from zope.app.tests.functional import FunctionalTestSetup
+## from zope.app.testing.functional import FunctionalTestSetup
## except ImportError:
## raise
## print ('Skipping functional tests: could not import '
-## 'zope.app.tests.functional')
+## 'zope.app.testing.functional')
## continue
# XXX We want to change *visible* warnings into errors. The next
Modified: Zope3/branches/srichter-blow-services/src/zope/app/traversing/ftests/test_vhosting.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/traversing/ftests/test_vhosting.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/traversing/ftests/test_vhosting.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,8 +16,7 @@
$Id$
"""
import unittest
-from zope.app.tests import ztapi
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing import ztapi, functional
from zope.app.folder import Folder
from transaction import get_transaction
from zope.app.publisher.browser.resource import Resource
@@ -32,7 +31,7 @@
defineChecker(MyObj, NoProxy)
-class TestVirtualHosting(BrowserTestCase):
+class TestVirtualHosting(functional.BrowserTestCase):
def test_request_url(self):
self.addPage('/pt', u'<span tal:replace="request/URL"/>')
Modified: Zope3/branches/srichter-blow-services/src/zope/app/workflow/definition.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/workflow/definition.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/workflow/definition.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -110,11 +110,11 @@
implements(IVocabularyTokenized)
def __init__(self, context):
- self.utilities = zapi.getService(Utilities, context)
+ self.sm = zapi.getSiteManager(context)
def __names(self):
- return [name for name, util in self.utilities.getUtilitiesFor(
- IProcessDefinition)]
+ return [name
+ for name, util in self.sm.getUtilitiesFor(IProcessDefinition)]
def __contains__(self, value):
"""See zope.schema.interfaces.IVocabulary"""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/workflow/stateful/browser/ftests/test_contentworkflowsmanager.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/workflow/stateful/browser/ftests/test_contentworkflowsmanager.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/workflow/stateful/browser/ftests/test_contentworkflowsmanager.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -23,11 +23,10 @@
from zope.interface import Interface
from zope.app.component.interface import nameToInterface
from zope.app import zapi
-from zope.app.tests.functional import BrowserTestCase
-from zope.app.tests.setup import addUtility
-from zope.app.registration.interfaces import ActiveStatus
-from zope.app.utility.utility import LocalUtilityService
-from zope.app.utility.utility import UtilityRegistration
+from zope.app.testing.functional import BrowserTestCase
+from zope.app.testing.setup import addUtility
+from zope.app.component.interfaces.registration import ActiveStatus
+from zope.app.component.site import UtilityRegistration
from zope.app.workflow.stateful.definition import StatefulProcessDefinition
from zope.app.workflow.stateful.interfaces import IStatefulProcessDefinition,\
@@ -59,7 +58,7 @@
root = self.getRootFolder()
default = zapi.traverse(root, '/++etc++site/default')
- rm = default.getRegistrationManager()
+ rm = default.registrationManager
registration = UtilityRegistration(
'cwm', IContentWorkflowsManager,
zapi.traverse(root, self.basepath+'/mgr'))
Modified: Zope3/branches/srichter-blow-services/src/zope/app/workflow/stateful/browser/ftests/test_processdefinition.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/workflow/stateful/browser/ftests/test_processdefinition.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/workflow/stateful/browser/ftests/test_processdefinition.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -19,7 +19,7 @@
import re
from zope.app import zapi
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.workflow.stateful.definition import StatefulProcessDefinition
xml=u"""<?xml version="1.0"?>
Modified: Zope3/branches/srichter-blow-services/src/zope/app/zapi/__init__.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/zapi/__init__.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/zapi/__init__.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -30,6 +30,8 @@
from zope.component import *
+from zope.app.publisher.browser import getDefaultViewName
+from zope.app.publisher.browser import queryDefaultViewName
from zope.app.traversing.api import *
from zope.app.traversing.browser.absoluteurl import absoluteURL
from zope.app.exception.interfaces import UserError
Modified: Zope3/branches/srichter-blow-services/src/zope/app/zapi/interfaces.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/zapi/interfaces.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/zapi/interfaces.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -17,12 +17,14 @@
"""
from zope.interface import Attribute
from zope.component.interfaces import IComponentArchitecture
+from zope.app.publisher.browser import IDefaultViewNameAPI
from zope.app.traversing.interfaces import ITraversalAPI
from zope.app.traversing.browser.interfaces import IAbsoluteURLAPI
class IZAPI(
IComponentArchitecture,
ITraversalAPI, IAbsoluteURLAPI,
+ IDefaultViewNameAPI
):
"""Convenience API for use with Zope applications.
"""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/zopetop/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/zopetop/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/zopetop/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -18,7 +18,7 @@
__docformat__ = 'restructuredtext'
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
class ZopeTopSkinTests(BrowserTestCase):
"""Funcional tests for ZopeTop skin."""
Modified: Zope3/branches/srichter-blow-services/src/zope/app/zptpage/browser/ftests.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/zptpage/browser/ftests.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/zptpage/browser/ftests.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -16,7 +16,7 @@
$Id: ftests.py 25177 2004-06-02 13:17:31Z jim $
"""
import unittest
-from zope.app.tests.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase
from zope.app.zptpage.zptpage import ZPTPage
from xml.sax.saxutils import escape
@@ -174,7 +174,7 @@
def test_suite():
- from zope.app.tests.functional import FunctionalDocFileSuite
+ from zope.app.testing.functional import FunctionalDocFileSuite
return unittest.TestSuite((
unittest.makeSuite(ZPTPageTest),
FunctionalDocFileSuite('collector266.txt', 'collector269.txt'),
Modified: Zope3/branches/srichter-blow-services/src/zope/app/zptpage/zptpage.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/zptpage/zptpage.py 2005-01-12 18:29:10 UTC (rev 28815)
+++ Zope3/branches/srichter-blow-services/src/zope/app/zptpage/zptpage.py 2005-01-12 20:37:44 UTC (rev 28816)
@@ -154,10 +154,6 @@
class ZPTSourceView(object):
- def __init__(self, context, request):
- self.context = context
- self.request = request
-
def __str__(self):
return self.context.getSource()
More information about the Zope3-Checkins
mailing list