Mercurial > p > roundup > code
diff test/db_test_base.py @ 3635:53987aa153d2
Transitive-property support.
- Fixed some of the pet-peeves from pep8
- Better parameter names for new _subselect method
- use new-style class for support.Proptree but needed a new-style class
for the property I introduced anyway.
- Fix a bug where searching did the wrong thing (interestingly enough
the same wrong thing for all backends): A search for
{'messages': ['1'], 'messages.author': ['2']}
would ignore the 'messages' part (messages being non-leaf node in
proptree). Fixed and added a regression test for this.
- Added the transitive searching to the SearchAction. New method
get_transitive_prop introduced in hyperdb that does the transitive
version of getprops()[name]. Fixed two tests to use the (faked) method
instead of getprop.
Now searching for transitive props via the web-interface works for me.
Thanks to alexander smishlajev for pointing me at the coding style.
Sorry for stepping on the peeves -- I'm using a different coding style
in most other projects I'm doing ...
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Thu, 13 Jul 2006 10:14:56 +0000 |
| parents | 57c66056ffe4 |
| children | fa7becc62534 |
line wrap: on
line diff
--- a/test/db_test_base.py Sat Jul 08 18:28:18 2006 +0000 +++ b/test/db_test_base.py Thu Jul 13 10:14:56 2006 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: db_test_base.py,v 1.70 2006-07-08 18:28:18 schlatterbeck Exp $ +# $Id: db_test_base.py,v 1.71 2006-07-13 10:14:56 schlatterbeck Exp $ import unittest, os, shutil, errno, imp, sys, time, pprint, sets @@ -1191,6 +1191,12 @@ ['6', '7', '8']) ae(filt(None, {'nosy.supervisor.username': 'ceo'}, ('+','id')), ['1', '2']) + ae(filt(None, {'messages.author': ['6', '9']}, + ('+','id')), ['1', '2', '5', '8']) + ae(filt(None, {'messages': ['5', '7']}, + ('+','id')), ['3', '5', '8']) + ae(filt(None, {'messages.author': ['6', '9'], 'messages': ['5', '7']}, + ('+','id')), ['5', '8']) # XXX add sorting tests for other types # XXX test auditors and reactors
