comparison test/test_cgi.py @ 3902:21420ba64b0d

fuller email validition (request [SF#216291]) Checks email syntax more rigorously. Perform address checks against "address" and any "alternate_addresses". Changed all of the unit tests to have addresses that pass this new check.
author Justus Pendleton <jpend@users.sourceforge.net>
date Wed, 12 Sep 2007 21:11:14 +0000
parents 9e48fda4a41c
children 91008ec8f9a0
comparison
equal deleted inserted replaced
3901:55e325e10a52 3902:21420ba64b0d
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.30 2007-07-05 19:21:57 schlatterbeck Exp $ 11 # $Id: test_cgi.py,v 1.31 2007-09-12 21:11:14 jpend 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.cgi.exceptions import FormError 16 from roundup.cgi.exceptions import FormError
68 68
69 # open the database 69 # open the database
70 self.db = self.instance.open('admin') 70 self.db = self.instance.open('admin')
71 self.db.user.create(username='Chef', address='chef@bork.bork.bork', 71 self.db.user.create(username='Chef', address='chef@bork.bork.bork',
72 realname='Bork, Chef', roles='User') 72 realname='Bork, Chef', roles='User')
73 self.db.user.create(username='mary', address='mary@test', 73 self.db.user.create(username='mary', address='mary@test.test',
74 roles='User', realname='Contrary, Mary') 74 roles='User', realname='Contrary, Mary')
75 75
76 test = self.instance.backend.Class(self.db, "test", 76 test = self.instance.backend.Class(self.db, "test",
77 string=hyperdb.String(), number=hyperdb.Number(), 77 string=hyperdb.String(), number=hyperdb.Number(),
78 boolean=hyperdb.Boolean(), link=hyperdb.Link('test'), 78 boolean=hyperdb.Boolean(), link=hyperdb.Link('test'),

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