comparison test/test_cgi.py @ 1734:5a04969176dc

Regression test case to ensure FileClass attribute bug doesn't show up again.
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Mon, 11 Aug 2003 11:28:31 +0000
parents b87c40d1b8fb
children c1eec970d5c0 e68b3c9a3b78
comparison
equal deleted inserted replaced
1733:c1eff6170234 1734:5a04969176dc
6 # 6 #
7 # This module is distributed in the hope that it will be useful, 7 # This module is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # 10 #
11 # $Id: test_cgi.py,v 1.17 2003-06-24 03:30:40 richard Exp $ 11 # $Id: test_cgi.py,v 1.18 2003-08-11 11:28:31 jlgijsbers Exp $
12 12
13 import unittest, os, shutil, errno, sys, difflib, cgi, re 13 import unittest, os, shutil, errno, sys, difflib, cgi, re
14 14
15 from roundup.cgi import client 15 from roundup.cgi import client
16 from roundup import init, instance, password, hyperdb, date 16 from roundup import init, instance, password, hyperdb, date
196 file = FileUpload('foo', 'foo.txt') 196 file = FileUpload('foo', 'foo.txt')
197 self.assertEqual(self.parseForm({'content': file}, 'file'), 197 self.assertEqual(self.parseForm({'content': file}, 'file'),
198 ({('file', None): {'content': 'foo', 'name': 'foo.txt', 198 ({('file', None): {'content': 'foo', 'name': 'foo.txt',
199 'type': 'text/plain'}}, [])) 199 'type': 'text/plain'}}, []))
200 200
201 def testEditFileClassAttributes(self):
202 self.assertEqual(self.parseForm({'name': 'foo.txt',
203 'type': 'application/octet-stream'},
204 'file'),
205 ({('file', None): {'name': 'foo.txt',
206 'type': 'application/octet-stream'}},[]))
207
201 # 208 #
202 # Link 209 # Link
203 # 210 #
204 def testEmptyLink(self): 211 def testEmptyLink(self):
205 self.assertEqual(self.parseForm({'link': ''}), 212 self.assertEqual(self.parseForm({'link': ''}),

Roundup Issue Tracker: http://roundup-tracker.org/