comparison test/test_cgi.py @ 1382:87143c3d7156

really fix [SF#663235], and test it
author Richard Jones <richard@users.sourceforge.net>
date Wed, 15 Jan 2003 11:14:01 +0000
parents 944bd3c6d365
children 2bd4822f96a6
comparison
equal deleted inserted replaced
1381:944bd3c6d365 1382:87143c3d7156
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.3 2003-01-15 11:07:45 richard Exp $ 11 # $Id: test_cgi.py,v 1.4 2003-01-15 11:14:01 richard Exp $
12 12
13 import unittest, os, shutil, errno, sys, difflib, cgi 13 import unittest, os, shutil, errno, sys, difflib, cgi
14 14
15 from roundup.cgi import client 15 from roundup.cgi import client
16 from roundup import init, instance, password 16 from roundup import init, instance, password
138 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue, 138 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue,
139 makeForm({':add:nosy': '2,mary'}), nodeid), {'nosy': ['1','2','4']}) 139 makeForm({':add:nosy': '2,mary'}), nodeid), {'nosy': ['1','2','4']})
140 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue, 140 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue,
141 makeForm({':add:nosy': ['2','3']}), nodeid), {'nosy': ['1','2','3']}) 141 makeForm({':add:nosy': ['2','3']}), nodeid), {'nosy': ['1','2','3']})
142 142
143 def testMultilinkAddNew(self):
144 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue,
145 makeForm({':add:nosy': ['2','3']})), {'nosy': ['2','3']})
146
143 def testMultilinkRemove(self): 147 def testMultilinkRemove(self):
144 nodeid = self.db.issue.create(nosy=['1','2']) 148 nodeid = self.db.issue.create(nosy=['1','2'])
145 # do nothing 149 # do nothing
146 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue, 150 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue,
147 makeForm({':remove:nosy': ''}), nodeid), {}) 151 makeForm({':remove:nosy': ''}), nodeid), {})

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