summaryrefslogtreecommitdiff
path: root/cherrypy/test/test_session.py
diff options
context:
space:
mode:
authorJoseph Tate <none@none>2010-02-24 15:47:23 +0000
committerJoseph Tate <none@none>2010-02-24 15:47:23 +0000
commit87cc005cbc16b53eee368f0a303bc8e91a41236f (patch)
tree810ba59c323a8a3bdb61aec08c5d6ed764d2d8a9 /cherrypy/test/test_session.py
parentc2fbf4231ca5170b292b0b54baddb8a6293ff120 (diff)
downloadcherrypy-git-87cc005cbc16b53eee368f0a303bc8e91a41236f.tar.gz
Convert the tests to use nose instead of our own runner. This strips out much coverage and profiling (handled by nose) and lets you focus on writing tests.
The biggest changes that have to be done in the tests classes is you have to put the "setup_server" method on the class(es) that need them when running. If you need it for multiple classes, you can use staticmethod() to attach it to multiple classes without using inheritance.
Diffstat (limited to 'cherrypy/test/test_session.py')
-rwxr-xr-xcherrypy/test/test_session.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cherrypy/test/test_session.py b/cherrypy/test/test_session.py
index 5259f0fd..c9cb57a2 100755
--- a/cherrypy/test/test_session.py
+++ b/cherrypy/test/test_session.py
@@ -1,5 +1,5 @@
from cherrypy.test import test
-test.prefer_parent_path()
+
from httplib import HTTPConnection, HTTPSConnection
import os
@@ -126,6 +126,7 @@ def setup_server():
from cherrypy.test import helper
class SessionTest(helper.CPWebCase):
+ setup_server = staticmethod(setup_server)
def tearDown(self):
# Clean up sessions.
@@ -373,11 +374,13 @@ try:
break
except (ImportError, socket.error):
class MemcachedSessionTest(helper.CPWebCase):
+ setup_server = staticmethod(setup_server)
def test(self):
return self.skip("memcached not reachable ")
else:
class MemcachedSessionTest(helper.CPWebCase):
+ setup_server = staticmethod(setup_server)
def test_0_Session(self):
self.getPage('/setsessiontype/memcached')