comparison test/test_cgi.py @ 1446:8ce33ce262a4

fix property type check, and dont create items that have no properties
author Richard Jones <richard@users.sourceforge.net>
date Tue, 18 Feb 2003 06:15:21 +0000
parents 13c42b803101
children ca3e0e2320be
comparison
equal deleted inserted replaced
1445:0bbc8be96592 1446:8ce33ce262a4
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.10 2003-02-17 06:44:01 richard Exp $ 11 # $Id: test_cgi.py,v 1.11 2003-02-18 06:15:21 richard 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
433 self.assertRaises(ValueError, self.parseForm, 433 self.assertRaises(ValueError, self.parseForm,
434 {'test-1@link@link': 'blah'}) 434 {'test-1@link@link': 'blah'})
435 self.assertRaises(ValueError, self.parseForm, 435 self.assertRaises(ValueError, self.parseForm,
436 {'test-1@link@link': 'issue'}) 436 {'test-1@link@link': 'issue'})
437 437
438 def testLinkNotLink(self):
439 self.assertRaises(ValueError, self.parseForm,
440 {'test-1@link@boolean': 'issue-1'})
441 self.assertRaises(ValueError, self.parseForm,
442 {'test-1@link@string': 'issue-1'})
443
438 def testBackwardsCompat(self): 444 def testBackwardsCompat(self):
439 res = self.parseForm({':note': 'spam'}, 'issue') 445 res = self.parseForm({':note': 'spam'}, 'issue')
440 date = res[0][('msg', '-1')]['date'] 446 date = res[0][('msg', '-1')]['date']
441 self.assertEqual(res, ({('issue', None): {}, ('msg', '-1'): 447 self.assertEqual(res, ({('issue', None): {}, ('msg', '-1'):
442 {'content': 'spam', 'author': '1', 'date': date}}, 448 {'content': 'spam', 'author': '1', 'date': date}},

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