summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorianb <devnull@localhost>2006-08-23 19:11:30 +0000
committerianb <devnull@localhost>2006-08-23 19:11:30 +0000
commit99d395d6b3d7a41f47e532eb2bf90197f92e69f6 (patch)
tree313a1425d2b15dad0f1582ed12824ca6db064232 /tests
parent823a63518e5979091cfae393e0c01758c74ef822 (diff)
downloadpaste-99d395d6b3d7a41f47e532eb2bf90197f92e69f6.tar.gz
Fixed a bug in the registry test (not code), since str(registered_object) never fails anymore. Fixed some formatting because of new-style exceptions in Python 2.5
Diffstat (limited to 'tests')
-rw-r--r--tests/test_exceptions/test_error_middleware.py2
-rw-r--r--tests/test_exceptions/test_reporter.py2
-rw-r--r--tests/test_registry.py5
3 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_exceptions/test_error_middleware.py b/tests/test_exceptions/test_error_middleware.py
index 658d887..428f2f4 100644
--- a/tests/test_exceptions/test_error_middleware.py
+++ b/tests/test_exceptions/test_error_middleware.py
@@ -87,7 +87,7 @@ def test_start_res():
def test_after_start():
res = do_request(after_start_response_app, 200)
res = strip_html(str(res))
- #print res
+ print res
assert 'ValueError: error2' in res
assert ':53' in res
diff --git a/tests/test_exceptions/test_reporter.py b/tests/test_exceptions/test_reporter.py
index da6c470..66f2266 100644
--- a/tests/test_exceptions/test_reporter.py
+++ b/tests/test_exceptions/test_reporter.py
@@ -28,7 +28,7 @@ def test_logger():
content = open(fn).read()
assert len(content.splitlines()) == 4
assert 'ValueError' in content
- assert 'int(): a' in content
+ assert 'int' in content
assert 'test_reporter.py' in content
assert 'test_logger' in content
diff --git a/tests/test_registry.py b/tests/test_registry.py
index f2ec717..c2538e3 100644
--- a/tests/test_registry.py
+++ b/tests/test_registry.py
@@ -19,7 +19,7 @@ def simpleapp_withregistry(environ, start_response):
status = '200 OK'
response_headers = [('Content-type','text/plain')]
start_response(status, response_headers)
- return ['Hello world!Value is %s\n' % testobj]
+ return ['Hello world!Value is %s\n' % testobj.keys()]
def simpleapp_withregistry_default(environ, start_response):
status = '200 OK'
@@ -74,7 +74,8 @@ class RegistryMiddleMan(object):
response = []
for line in app_iter:
response.append(line)
- app_iter.close()
+ if hasattr(app_iter, 'close'):
+ app_iter.close()
app_response.extend(response)
app_response.extend(['\nAppended by middleware!\nAppendValue at \
depth %s is %s' % (self.depth, str(testobj))])