[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/ Move charset/language adapter setup to zope.i18n.testing.

Philipp von Weitershausen philikon at philikon.de
Wed Apr 19 12:02:10 EDT 2006


Log message for revision 67139:
  Move charset/language adapter setup to zope.i18n.testing.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/__init__.py
  U   Zope3/branches/jim-adapter/src/zope/app/i18n/tests/__init__.py
  D   Zope3/branches/jim-adapter/src/zope/app/i18n/tests/placelesssetup.py
  U   Zope3/branches/jim-adapter/src/zope/app/testing/placelesssetup.py
  A   Zope3/branches/jim-adapter/src/zope/i18n/testing.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/__init__.py	2006-04-19 16:01:17 UTC (rev 67138)
+++ Zope3/branches/jim-adapter/src/zope/app/__init__.py	2006-04-19 16:02:08 UTC (rev 67139)
@@ -25,9 +25,11 @@
     'zope.app.copypastemove.interfaces': 'zope.copypastemove.interfaces',
 
     'zope.app.decorator': 'zope.decorator',
-
+    'zope.app.component.interface': 'zope.component.interface',
+    'zope.app.content_types': 'zope.contenttype',
     'zope.app.datetimeutils': 'zope.datetime',
     'zope.app.timezones': 'zope.datetime.timezones',
+    'zope.app.i18n.tests.placelesssetup': 'zope.i18n.testing',
 
     'zope.app.mail': 'zope.sendmail',
     'zope.app.mail.event': 'zope.sendmail.event',
@@ -85,9 +87,6 @@
 
     'zope.app.security.adapter': 'zope.security.adapter',
     'zope.app.security.fields': 'zope.security.zcml',
-
-    'zope.app.component.interface': 'zope.component.interface',
-    'zope.app.content_types': 'zope.contenttype',
     }
 
 msg_35 = "%s has been moved to %s.  This alias will be removed in Zope 3.5."

Modified: Zope3/branches/jim-adapter/src/zope/app/i18n/tests/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/i18n/tests/__init__.py	2006-04-19 16:01:17 UTC (rev 67138)
+++ Zope3/branches/jim-adapter/src/zope/app/i18n/tests/__init__.py	2006-04-19 16:02:08 UTC (rev 67139)
@@ -1,2 +1,9 @@
-#
 # This file is necessary to make this directory a package.
+
+# BBB 2006/04/19 -- to be removed after 12 months
+import zope.deferredimport
+zope.deferredimport.deprecated(
+    "Its contents has moved into zope.i18n.testing.  This reference "
+    "will be gone in Zope 3.5",
+    placelesssetup = 'zope.i18n.testing',
+    )

Deleted: Zope3/branches/jim-adapter/src/zope/app/i18n/tests/placelesssetup.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/i18n/tests/placelesssetup.py	2006-04-19 16:01:17 UTC (rev 67138)
+++ Zope3/branches/jim-adapter/src/zope/app/i18n/tests/placelesssetup.py	2006-04-19 16:02:08 UTC (rev 67139)
@@ -1,30 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2002 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.
-#
-##############################################################################
-"""Unit test logic for setting up and tearing down basic infrastructure
-
-$Id$
-"""
-from zope.app.testing import ztapi
-from zope.i18n.interfaces import IUserPreferredCharsets
-from zope.i18n.interfaces import IUserPreferredLanguages
-from zope.publisher.browser import BrowserLanguages
-from zope.publisher.http import HTTPCharsets, IHTTPRequest
-
-class PlacelessSetup(object):
-
-    def setUp(self):
-        ztapi.provideAdapter(IHTTPRequest, IUserPreferredCharsets,
-                             HTTPCharsets)
-        ztapi.provideAdapter(IHTTPRequest, IUserPreferredLanguages,
-                             BrowserLanguages)

Modified: Zope3/branches/jim-adapter/src/zope/app/testing/placelesssetup.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/testing/placelesssetup.py	2006-04-19 16:01:17 UTC (rev 67138)
+++ Zope3/branches/jim-adapter/src/zope/app/testing/placelesssetup.py	2006-04-19 16:02:08 UTC (rev 67139)
@@ -17,12 +17,11 @@
 """
 from zope.schema.vocabulary import setVocabularyRegistry
 from zope.component.testing import PlacelessSetup as CAPlacelessSetup
+from zope.i18n.testing import PlacelessSetup as I18nPlacelessSetup
 from zope.traversing.browser.interfaces import IAbsoluteURL
 from zope.traversing.browser.absoluteurl import AbsoluteURL
 
 from zope.app.testing import ztapi
-from zope.app.i18n.tests.placelesssetup \
-    import PlacelessSetup as I18nPlacelessSetup
 from zope.app.container.tests.placelesssetup \
     import PlacelessSetup as ContainerPlacelessSetup
 from zope.app.authentication.placelesssetup \

Copied: Zope3/branches/jim-adapter/src/zope/i18n/testing.py (from rev 67125, Zope3/branches/jim-adapter/src/zope/app/i18n/tests/placelesssetup.py)
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/i18n/tests/placelesssetup.py	2006-04-19 12:46:56 UTC (rev 67125)
+++ Zope3/branches/jim-adapter/src/zope/i18n/testing.py	2006-04-19 16:02:08 UTC (rev 67139)
@@ -0,0 +1,29 @@
+##############################################################################
+#
+# Copyright (c) 2002 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.
+#
+##############################################################################
+"""Unit test logic for setting up and tearing down basic infrastructure
+
+$Id$
+"""
+import zope.component
+from zope.publisher.browser import BrowserLanguages
+from zope.publisher.http import HTTPCharsets
+
+def setUp(test=None):
+    zope.component.provideAdapter(HTTPCharsets)
+    zope.component.provideAdapter(BrowserLanguages)
+
+class PlacelessSetup(object):
+
+    def setUp(self):
+        setUp()



More information about the Zope3-Checkins mailing list