Changeset 1954
- Timestamp:
- 04/26/08 19:45:56
- Files:
-
- trunk/cherrypy/test/test_tutorials.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/test/test_tutorials.py
r1868 r1954 145 145 146 146 # Test upload 147 filesize = 5 147 148 h = [("Content-type", "multipart/form-data; boundary=x"), 148 ("Content-Length", "110")]149 ("Content-Length", str(105 + filesize))] 149 150 b = """--x 150 151 Content-Disposition: form-data; name="myFile"; filename="hello.txt" 151 152 Content-Type: text/plain 152 153 153 hello 154 %s 154 155 --x-- 155 """ 156 """ % ("a" * filesize) 156 157 self.getPage('/upload', h, "POST", b) 157 158 self.assertBody('''<html> 158 159 <body> 159 myFile length: 5<br />160 myFile length: %d<br /> 160 161 myFile filename: hello.txt<br /> 161 162 myFile mime-type: text/plain 162 163 </body> 163 </html>''' )164 </html>''' % filesize) 164 165 165 166 # Test download

