summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 859d769)
raw | patch | inline | side by side (parent: 859d769)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 10 Dec 2003 01:40:51 +0000 (01:40 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 10 Dec 2003 01:40:51 +0000 (01:40 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2022 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/backends/back_anydbm.py | patch | blob | history | |
test/db_test_base.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 9e67f7986c69eefa3024eab25b4ab7cd62c4a5a0..3321df3390609c9d9588bdd585fe7ba3c3dbe659 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- use FormError in client.py, moving the handling up to inner_main().
- implemented semantic comparison of Message objects in test_mailgw.
+
2003-??-?? 0.6.4
Fixed:
- fixed date arithmetic to not allow day-of-month == 0 (sf bug 853306)
index 090965e846f791b3ac845766f45f242e10d3e1d6..6450b26101d756f8c939cd71251dd8de5d4c2147 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: back_anydbm.py,v 1.133 2003-12-05 09:47:46 richard Exp $
+#$Id: back_anydbm.py,v 1.134 2003-12-10 01:40:51 richard Exp $
'''
This module defines a backend that saves the hyperdatabase in a database
chosen by anydbm. It is guaranteed to always be available in python
if isinstance(propclass, Link):
if type(v) is not type([]):
v = [v]
- # replace key values with node ids
u = []
- link_class = self.db.classes[propclass.classname]
for entry in v:
# the value -1 is a special "not set" sentinel
if entry == '-1':
entry = None
- elif not num_re.match(entry):
- try:
- entry = link_class.lookup(entry)
- except (TypeError,KeyError):
- raise ValueError, 'property "%s": %s not a %s'%(
- k, entry, self.properties[k].classname)
u.append(entry)
-
l.append((LINK, k, u))
elif isinstance(propclass, Multilink):
# the value -1 is a special "not set" sentinel
v = []
elif type(v) is not type([]):
v = [v]
-
- # replace key values with node ids
- u = []
- link_class = self.db.classes[propclass.classname]
- for entry in v:
- if not num_re.match(entry):
- try:
- entry = link_class.lookup(entry)
- except (TypeError,KeyError):
- raise ValueError, 'new property "%s": %s not a %s'%(
- k, entry, self.properties[k].classname)
- u.append(entry)
- u.sort()
- l.append((MULTILINK, k, u))
+ l.append((MULTILINK, k, v))
elif isinstance(propclass, String) and k != 'id':
if type(v) is not type([]):
v = [v]
diff --git a/test/db_test_base.py b/test/db_test_base.py
index 681cf4f37d2c430b8c488c824a55916648ef9da5..ed707abb1cc7c49915bd391acfabb1be7ef1e1ac 100644 (file)
--- a/test/db_test_base.py
+++ b/test/db_test_base.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: db_test_base.py,v 1.11 2003-12-05 09:47:46 richard Exp $
+# $Id: db_test_base.py,v 1.12 2003-12-10 01:40:51 richard Exp $
import unittest, os, shutil, errno, imp, sys, time, pprint
self.db.user.create(**user)
iss = self.db.issue
for issue in (
- {'title': 'issue one', 'status': '2',
+ {'title': 'issue one', 'status': '2', 'assignedto': '1',
'foo': date.Interval('1:10'),
'deadline': date.Date('2003-01-01.00:00')},
- {'title': 'issue two', 'status': '1',
+ {'title': 'issue two', 'status': '1', 'assignedto': '2',
'foo': date.Interval('1d'),
'deadline': date.Date('2003-02-16.22:50')},
{'title': 'issue three', 'status': '1',
def testFilteringLink(self):
ae, filt = self.filteringSetup()
ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3'])
+ ae(filt(None, {'assignedto': '-1'}, ('+','id'), (None,None)), ['3','4'])
def testFilteringRetired(self):
ae, filt = self.filteringSetup()