comparison test/test_db.py @ 905:502a5ae11cc5

Very close now. The cgi and mailgw now use the new security API. The two templates have been migrated to that setup. Lots of unit tests. Still some issue in the web form for editing Roles assigned to users.
author Richard Jones <richard@users.sourceforge.net>
date Fri, 26 Jul 2002 08:27:00 +0000
parents b0d3d3535998
children 51519406b73e
comparison
equal deleted inserted replaced
904:02763530b9e8 905:502a5ae11cc5
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: test_db.py,v 1.37 2002-07-25 07:14:06 richard Exp $ 18 # $Id: test_db.py,v 1.38 2002-07-26 08:27:00 richard Exp $
19 19
20 import unittest, os, shutil, time 20 import unittest, os, shutil, time
21 21
22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ 22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \
23 Interval, DatabaseError, Boolean, Number 23 Interval, DatabaseError, Boolean, Number
26 26
27 def setupSchema(db, create, module): 27 def setupSchema(db, create, module):
28 status = module.Class(db, "status", name=String()) 28 status = module.Class(db, "status", name=String())
29 status.setkey("name") 29 status.setkey("name")
30 user = module.Class(db, "user", username=String(), password=Password(), 30 user = module.Class(db, "user", username=String(), password=Password(),
31 assignable=Boolean(), age=Number(), roles=Multilink('role')) 31 assignable=Boolean(), age=Number(), roles=String())
32 user.setkey("username") 32 user.setkey("username")
33 file = module.FileClass(db, "file", name=String(), type=String(), 33 file = module.FileClass(db, "file", name=String(), type=String(),
34 comment=String(indexme="yes")) 34 comment=String(indexme="yes"))
35 issue = module.IssueClass(db, "issue", title=String(indexme="yes"), 35 issue = module.IssueClass(db, "issue", title=String(indexme="yes"),
36 status=Link("status"), nosy=Multilink("user"), deadline=Date(), 36 status=Link("status"), nosy=Multilink("user"), deadline=Date(),
601 601
602 return unittest.TestSuite(l) 602 return unittest.TestSuite(l)
603 603
604 # 604 #
605 # $Log: not supported by cvs2svn $ 605 # $Log: not supported by cvs2svn $
606 # Revision 1.37 2002/07/25 07:14:06 richard
607 # Bugger it. Here's the current shape of the new security implementation.
608 # Still to do:
609 # . call the security funcs from cgi and mailgw
610 # . change shipped templates to include correct initialisation and remove
611 # the old config vars
612 # ... that seems like a lot. The bulk of the work has been done though. Honest :)
613 #
606 # Revision 1.36 2002/07/19 03:36:34 richard 614 # Revision 1.36 2002/07/19 03:36:34 richard
607 # Implemented the destroy() method needed by the session database (and possibly 615 # Implemented the destroy() method needed by the session database (and possibly
608 # others). At the same time, I removed the leading underscores from the hyperdb 616 # others). At the same time, I removed the leading underscores from the hyperdb
609 # methods that Really Didn't Need Them. 617 # methods that Really Didn't Need Them.
610 # The journal also raises IndexError now for all situations where there is a 618 # The journal also raises IndexError now for all situations where there is a

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