Back to index

plone3  3.1.7
Functions
PluggableAuthService.tests.utils Namespace Reference

Functions

def _setUpDefaultTraversable
 Copyright (c) 2006 Zope Corporation and Contributors.

Function Documentation

Copyright (c) 2006 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.

Definition at line 20 of file utils.py.

00020 
00021 def _setUpDefaultTraversable():
00022     # Work around behavior change in Zope 2.10 due to its use of the 
00023     # Zope 3 pagetemplates
00024     try:
00025         from zope.interface import Interface
00026         from zope.component import provideAdapter
00027         from zope.traversing.interfaces import ITraversable
00028         from zope.traversing.adapters import DefaultTraversable
00029         provideAdapter(DefaultTraversable, (Interface,), ITraversable)
00030     except ImportError:
00031         # Zope < 2.10 - no need to do anything
00032         pass