summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfs <devnull@localhost>2010-04-02 11:12:07 +0000
committerfs <devnull@localhost>2010-04-02 11:12:07 +0000
commite02774ffb1048b2cb4c914eebe3f1a382a755b14 (patch)
tree29e881169a03c85964c46adc79ee196aea5ffd98
parenteba54085eff576a66529272f978f4fcfa28b1899 (diff)
downloadcherrypy-e02774ffb1048b2cb4c914eebe3f1a382a755b14.tar.gz
Make the test suite compatible with Python 2.6: cls must be the first parameter when calling type's !__init__ in a metaclass
Patch by Toshio Kuratomi, imported from Fedora CVS, licensed under the same terms as CherryPy 2.3
-rw-r--r--cherrypy/test/test_core.py2
-rw-r--r--cherrypy/test/test_custom_filters.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/cherrypy/test/test_core.py b/cherrypy/test/test_core.py
index dde3e29a..74661bb6 100644
--- a/cherrypy/test/test_core.py
+++ b/cherrypy/test/test_core.py
@@ -52,7 +52,7 @@ def setup_server():
and adds an instance of the subclass as an attribute of cherrypy.root.
"""
def __init__(cls, name, bases, dct):
- type.__init__(name, bases, dct)
+ type.__init__(cls, name, bases, dct)
for value in dct.itervalues():
if isinstance(value, types.FunctionType):
value.exposed = True
diff --git a/cherrypy/test/test_custom_filters.py b/cherrypy/test/test_custom_filters.py
index 18facb34..995f559b 100644
--- a/cherrypy/test/test_custom_filters.py
+++ b/cherrypy/test/test_custom_filters.py
@@ -79,7 +79,7 @@ def setup_server():
and adds an instance of the subclass as an attribute of cherrypy.root.
"""
def __init__(cls, name, bases, dct):
- type.__init__(name, bases, dct)
+ type.__init__(cls, name, bases, dct)
for value in dct.itervalues():
if isinstance(value, types.FunctionType):
value.exposed = True