summaryrefslogtreecommitdiff
path: root/tests/test_forms.py
diff options
context:
space:
mode:
authorStéphane Klein <sklein@bearstech.com>2013-02-22 18:38:04 +0100
committerStéphane Klein <sklein@bearstech.com>2013-02-22 18:38:28 +0100
commit96489d8c447bd4c039f0f3f42e2e279f8d02c442 (patch)
tree66fc649e1d2c71ef644cf3df310b55d4f24a3a05 /tests/test_forms.py
parent073e7c37e68e01f4e86268db4bf636509b0ecd8f (diff)
downloadwebtest-96489d8c447bd4c039f0f3f42e2e279f8d02c442.tar.gz
Improve webtest.response.TestResponse coverage
Diffstat (limited to 'tests/test_forms.py')
-rw-r--r--tests/test_forms.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_forms.py b/tests/test_forms.py
index c31a8fc..5b35902 100644
--- a/tests/test_forms.py
+++ b/tests/test_forms.py
@@ -874,7 +874,18 @@ class TestFileUpload(unittest.TestCase):
def test_invalid_uploadfiles(self):
app = webtest.TestApp(SingleUploadFileApp())
self.assertRaises(ValueError, app.post, '/', upload_files=[()])
- self.assertRaises(ValueError,
+ self.assertRaises(
+ ValueError,
app.post, '/',
upload_files=[('name', 'filename', 'content', 'extra')]
)
+
+ def test_goto_uploadfiles(self):
+ app = webtest.TestApp(SingleUploadFileApp())
+ resp = app.get('/')
+ print(resp)
+ resp.goto(
+ '/',
+ method='post',
+ upload_files=[('name', 'filename', b'content')]
+ )