diff options
| author | bbangert <devnull@localhost> | 2006-03-10 21:33:00 +0000 |
|---|---|---|
| committer | bbangert <devnull@localhost> | 2006-03-10 21:33:00 +0000 |
| commit | 6503312b8c3138773064b90cc88196ebe404162c (patch) | |
| tree | bcb068bade50eb8005967da3c0526e6c4aa9376c /tests/test_registry.py | |
| parent | 2659c4a3ea4d0dd0b1b2121f6b63ebb12a1c4f49 (diff) | |
| download | paste-6503312b8c3138773064b90cc88196ebe404162c.tar.gz | |
Didn't need custom app_iter, as my unit test wasn't following WSGI spec by calling close on the response. Unit tests for registry all passing
Diffstat (limited to 'tests/test_registry.py')
| -rw-r--r-- | tests/test_registry.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_registry.py b/tests/test_registry.py index bf4f507..b0aadef 100644 --- a/tests/test_registry.py +++ b/tests/test_registry.py @@ -52,7 +52,11 @@ class RegistryMiddleMan(object): if type(app_iter) in (list, tuple): app_response.extend(app_iter) else: - app_response.extend(list(app_iter)) + response = [] + for line in app_iter: + response.append(line) + app_iter.close() + app_response.extend(response) app_response.extend(['\nAppended by middleware!\nAppendValue at \ depth %s is %s' % (self.depth, str(testobj))]) return app_response @@ -120,7 +124,6 @@ def test_iterating_response(): wsgiapp = RegistryManager(wsgiapp) app = TestApp(wsgiapp) res = app.get('/') - print res.body assert 'Hello world' in res assert 'The variable is' in res assert "{'hi': 'people'}" in res |
