diff options
author | ianb <devnull@localhost> | 2005-08-22 21:17:49 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2005-08-22 21:17:49 +0000 |
commit | 3f5cfae607ee49e4340e6d64f755e25f6fb71914 (patch) | |
tree | 7454d03a25bc8f20d658a1bf1c4facaedf19cede /tests/test_cgiapp.py | |
parent | a171c7d41358b02b3a1859732318bb1fde82fcd7 (diff) | |
download | paste-3f5cfae607ee49e4340e6d64f755e25f6fb71914.tar.gz |
Bug fixes
Diffstat (limited to 'tests/test_cgiapp.py')
-rw-r--r-- | tests/test_cgiapp.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_cgiapp.py b/tests/test_cgiapp.py index f7c5dab..8a0dfcf 100644 --- a/tests/test_cgiapp.py +++ b/tests/test_cgiapp.py @@ -7,14 +7,14 @@ data_dir = os.path.join(os.path.dirname(__file__), 'cgiapp_data') def test_ok(): - app = TestApp(CGIApplication('ok.cgi', [data_dir])) + app = TestApp(CGIApplication({}, script='ok.cgi', path=[data_dir])) res = app.get('') assert res.header('content-type') == 'text/html; charset=UTF-8' assert res.full_status == '200 Okay' assert 'This is the body' in res def test_form(): - app = TestApp(CGIApplication('form.cgi', [data_dir])) + app = TestApp(CGIApplication({}, script='form.cgi', path=[data_dir])) res = app.post('', params={'name': 'joe'}, upload_files=[('up', 'file.txt', 'x'*10000)]) assert 'file.txt' in res @@ -22,11 +22,11 @@ def test_form(): assert 'x'*10000 in res def test_error(): - app = TestApp(CGIApplication('error.cgi', [data_dir])) + app = TestApp(CGIApplication({}, script='error.cgi', path=[data_dir])) py.test.raises(CGIError, "app.get('', status=500)") def test_stderr(): - app = TestApp(CGIApplication('stderr.cgi', [data_dir])) + app = TestApp(CGIApplication({}, script='stderr.cgi', path=[data_dir])) res = app.get('', expect_errors=True) assert res.status == 500 assert 'error' in res |