Back to index

plone3  3.1.7
Classes | Functions | Variables
GroupUserFolder.tests.testInterface Namespace Reference

Classes

class  TestInterface
 klasses = ( # tell which classes to check GroupUserFolder.GroupUserFolder, GRUFUser.GRUFUser, GRUFUser.GRUFGroup, ) More...

Functions

def flattenList
def flattenInterfaces
def test_suite

Variables

string __version__ = "$Revision: $"
 GroupUserFolder Copyright (C)2006 Ingeniweb.
string __docformat__ = 'restructuredtext'

Function Documentation

flattenInterfaces => fetch interfaces and inherited ones

Definition at line 56 of file testInterface.py.

00056 
00057 def flattenInterfaces(lst):
00058     """
00059     flattenInterfaces => fetch interfaces and inherited ones
00060     """
00061     ret = []
00062     lst = flattenList(lst)
00063     for intf in lst:
00064         bases = intf.getBases()
00065         ret.extend(flattenInterfaces(bases))
00066         if not intf in ret:
00067             ret.append(intf)
00068     return ret
00069 
00070 
# Products and global vars

Here is the call graph for this function:

Here is the caller graph for this function:

flattenList => transform a (deep) sequence into a simple sequence

Definition at line 40 of file testInterface.py.

00040 
00041 def flattenList(lst):
00042     """
00043     flattenList => transform a (deep) sequence into a simple sequence
00044     """
00045     ret = []
00046 
00047     if type(lst) not in (type(()), type([])):
00048         return (lst, )
00049 
00050     for item in lst:
00051         if type(item) in (type(()), type([]), ):
00052             ret.extend(flattenList(item))
00053         else:
00054             ret.append(item)
00055     return ret

Here is the caller graph for this function:

Definition at line 183 of file testInterface.py.

00183 
00184 def test_suite():
00185     from unittest import TestSuite, makeSuite
00186     suite = TestSuite()
00187     #suite.addTest(makeSuite(TestInterface))
00188     return suite


Variable Documentation

Definition at line 24 of file testInterface.py.

GroupUserFolder Copyright (C)2006 Ingeniweb.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Definition at line 21 of file testInterface.py.