comparison test/test_cgi.py @ 1541:a61ca144d3a4 maint-0.5

fixing incorrect test - unset Strings should be (None) unset, not ""
author Richard Jones <richard@users.sourceforge.net>
date Fri, 21 Mar 2003 21:43:04 +0000
parents a87f59436895
children b6621f8bd496
comparison
equal deleted inserted replaced
1533:a2c23a775557 1541:a61ca144d3a4
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.4.2.1 2003-01-15 22:38:14 richard Exp $ 11 # $Id: test_cgi.py,v 1.4.2.2 2003-03-21 21:43:04 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
85 makeForm({'title': 'a\r\nb\r\n'})), {'title': 'a\nb'}) 85 makeForm({'title': 'a\r\nb\r\n'})), {'title': 'a\nb'})
86 86
87 def testEmptyStringSet(self): 87 def testEmptyStringSet(self):
88 nodeid = self.db.issue.create(title='foo') 88 nodeid = self.db.issue.create(title='foo')
89 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue, 89 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue,
90 makeForm({'title': ''}), nodeid), {'title': ''}) 90 makeForm({'title': ''}), nodeid), {'title': None})
91 nodeid = self.db.issue.create(title='foo') 91 nodeid = self.db.issue.create(title='foo')
92 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue, 92 self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue,
93 makeForm({'title': ' '}), nodeid), {'title': ''}) 93 makeForm({'title': ' '}), nodeid), {'title': None})
94 94
95 # 95 #
96 # Link 96 # Link
97 # 97 #
98 def testEmptyLink(self): 98 def testEmptyLink(self):

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