Mercurial > p > roundup > code
comparison test/test_db.py @ 1090:9b910e8d987d
removed Log
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 10 Sep 2002 00:19:55 +0000 |
| parents | 8c2036dace08 |
| children | fa7df238e2d4 |
comparison
equal
deleted
inserted
replaced
| 1089:43ab730ee194 | 1090:9b910e8d987d |
|---|---|
| 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.42 2002-08-23 05:33:32 richard Exp $ | 18 # $Id: test_db.py,v 1.43 2002-09-10 00:19:54 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 |
| 674 except: | 674 except: |
| 675 print 'metakit module not found, skipping metakit DBTestCase' | 675 print 'metakit module not found, skipping metakit DBTestCase' |
| 676 | 676 |
| 677 return unittest.TestSuite(l) | 677 return unittest.TestSuite(l) |
| 678 | 678 |
| 679 # | |
| 680 # $Log: not supported by cvs2svn $ | |
| 681 # Revision 1.40 2002/08/23 04:48:36 richard | |
| 682 # oops, forgot | |
| 683 # | |
| 684 # Revision 1.39 2002/07/31 23:57:37 richard | |
| 685 # . web forms may now unset Link values (like assignedto) | |
| 686 # | |
| 687 # Revision 1.38 2002/07/26 08:27:00 richard | |
| 688 # Very close now. The cgi and mailgw now use the new security API. The two | |
| 689 # templates have been migrated to that setup. Lots of unit tests. Still some | |
| 690 # issue in the web form for editing Roles assigned to users. | |
| 691 # | |
| 692 # Revision 1.37 2002/07/25 07:14:06 richard | |
| 693 # Bugger it. Here's the current shape of the new security implementation. | |
| 694 # Still to do: | |
| 695 # . call the security funcs from cgi and mailgw | |
| 696 # . change shipped templates to include correct initialisation and remove | |
| 697 # the old config vars | |
| 698 # ... that seems like a lot. The bulk of the work has been done though. Honest :) | |
| 699 # | |
| 700 # Revision 1.36 2002/07/19 03:36:34 richard | |
| 701 # Implemented the destroy() method needed by the session database (and possibly | |
| 702 # others). At the same time, I removed the leading underscores from the hyperdb | |
| 703 # methods that Really Didn't Need Them. | |
| 704 # The journal also raises IndexError now for all situations where there is a | |
| 705 # request for the journal of a node that doesn't have one. It used to return | |
| 706 # [] in _some_ situations, but not all. This _may_ break code, but the tests | |
| 707 # pass... | |
| 708 # | |
| 709 # Revision 1.35 2002/07/18 23:07:08 richard | |
| 710 # Unit tests and a few fixes. | |
| 711 # | |
| 712 # Revision 1.34 2002/07/18 11:52:00 richard | |
| 713 # oops | |
| 714 # | |
| 715 # Revision 1.33 2002/07/18 11:50:58 richard | |
| 716 # added tests for number type too | |
| 717 # | |
| 718 # Revision 1.32 2002/07/18 11:41:10 richard | |
| 719 # added tests for boolean type, and fixes to anydbm backend | |
| 720 # | |
| 721 # Revision 1.31 2002/07/14 23:17:45 richard | |
| 722 # minor change to make testing easier | |
| 723 # | |
| 724 # Revision 1.30 2002/07/14 06:06:34 richard | |
| 725 # Did some old TODOs | |
| 726 # | |
| 727 # Revision 1.29 2002/07/14 04:03:15 richard | |
| 728 # Implemented a switch to disable journalling for a Class. CGI session | |
| 729 # database now uses it. | |
| 730 # | |
| 731 # Revision 1.28 2002/07/14 02:16:29 richard | |
| 732 # Fixes for the metakit backend (removed the cut-n-paste IssueClass, removed | |
| 733 # a special case for it in testing) | |
| 734 # | |
| 735 # Revision 1.27 2002/07/14 02:05:54 richard | |
| 736 # . all storage-specific code (ie. backend) is now implemented by the backends | |
| 737 # | |
| 738 # Revision 1.26 2002/07/11 01:11:03 richard | |
| 739 # Added metakit backend to the db tests and fixed the more easily fixable test | |
| 740 # failures. | |
| 741 # | |
| 742 # Revision 1.25 2002/07/09 04:19:09 richard | |
| 743 # Added reindex command to roundup-admin. | |
| 744 # Fixed reindex on first access. | |
| 745 # Also fixed reindexing of entries that change. | |
| 746 # | |
| 747 # Revision 1.24 2002/07/09 03:02:53 richard | |
| 748 # More indexer work: | |
| 749 # - all String properties may now be indexed too. Currently there's a bit of | |
| 750 # "issue" specific code in the actual searching which needs to be | |
| 751 # addressed. In a nutshell: | |
| 752 # + pass 'indexme="yes"' as a String() property initialisation arg, eg: | |
| 753 # file = FileClass(db, "file", name=String(), type=String(), | |
| 754 # comment=String(indexme="yes")) | |
| 755 # + the comment will then be indexed and be searchable, with the results | |
| 756 # related back to the issue that the file is linked to | |
| 757 # - as a result of this work, the FileClass has a default MIME type that may | |
| 758 # be overridden in a subclass, or by the use of a "type" property as is | |
| 759 # done in the default templates. | |
| 760 # - the regeneration of the indexes (if necessary) is done once the schema is | |
| 761 # set up in the dbinit. | |
| 762 # | |
| 763 # Revision 1.23 2002/06/20 23:51:48 richard | |
| 764 # Cleaned up the hyperdb tests | |
| 765 # | |
| 766 # Revision 1.22 2002/05/21 05:52:11 richard | |
| 767 # Well whadya know, bsddb3 works again. | |
| 768 # The backend is implemented _exactly_ the same as bsddb - so there's no | |
| 769 # using its transaction or locking support. It'd be nice to use those some | |
| 770 # day I suppose. | |
| 771 # | |
| 772 # Revision 1.21 2002/04/15 23:25:15 richard | |
| 773 # . node ids are now generated from a lockable store - no more race conditions | |
| 774 # | |
| 775 # We're using the portalocker code by Jonathan Feinberg that was contributed | |
| 776 # to the ASPN Python cookbook. This gives us locking across Unix and Windows. | |
| 777 # | |
| 778 # Revision 1.20 2002/04/03 05:54:31 richard | |
| 779 # Fixed serialisation problem by moving the serialisation step out of the | |
| 780 # hyperdb.Class (get, set) into the hyperdb.Database. | |
| 781 # | |
| 782 # Also fixed htmltemplate after the showid changes I made yesterday. | |
| 783 # | |
| 784 # Unit tests for all of the above written. | |
| 785 # | |
| 786 # Revision 1.19 2002/02/25 14:34:31 grubert | |
| 787 # . use blobfiles in back_anydbm which is used in back_bsddb. | |
| 788 # change test_db as dirlist does not work for subdirectories. | |
| 789 # ATTENTION: blobfiles now creates subdirectories for files. | |
| 790 # | |
| 791 # Revision 1.18 2002/01/22 07:21:13 richard | |
| 792 # . fixed back_bsddb so it passed the journal tests | |
| 793 # | |
| 794 # ... it didn't seem happy using the back_anydbm _open method, which is odd. | |
| 795 # Yet another occurrance of whichdb not being able to recognise older bsddb | |
| 796 # databases. Yadda yadda. Made the HYPERDBDEBUG stuff more sane in the | |
| 797 # process. | |
| 798 # | |
| 799 # Revision 1.17 2002/01/22 05:06:09 rochecompaan | |
| 800 # We need to keep the last 'set' entry in the journal to preserve | |
| 801 # information on 'activity' for nodes. | |
| 802 # | |
| 803 # Revision 1.16 2002/01/21 16:33:20 rochecompaan | |
| 804 # You can now use the roundup-admin tool to pack the database | |
| 805 # | |
| 806 # Revision 1.15 2002/01/19 13:16:04 rochecompaan | |
| 807 # Journal entries for link and multilink properties can now be switched on | |
| 808 # or off. | |
| 809 # | |
| 810 # Revision 1.14 2002/01/16 07:02:57 richard | |
| 811 # . lots of date/interval related changes: | |
| 812 # - more relaxed date format for input | |
| 813 # | |
| 814 # Revision 1.13 2002/01/14 02:20:15 richard | |
| 815 # . changed all config accesses so they access either the instance or the | |
| 816 # config attriubute on the db. This means that all config is obtained from | |
| 817 # instance_config instead of the mish-mash of classes. This will make | |
| 818 # switching to a ConfigParser setup easier too, I hope. | |
| 819 # | |
| 820 # At a minimum, this makes migration a _little_ easier (a lot easier in the | |
| 821 # 0.5.0 switch, I hope!) | |
| 822 # | |
| 823 # Revision 1.12 2001/12/17 03:52:48 richard | |
| 824 # Implemented file store rollback. As a bonus, the hyperdb is now capable of | |
| 825 # storing more than one file per node - if a property name is supplied, | |
| 826 # the file is called designator.property. | |
| 827 # I decided not to migrate the existing files stored over to the new naming | |
| 828 # scheme - the FileClass just doesn't specify the property name. | |
| 829 # | |
| 830 # Revision 1.11 2001/12/10 23:17:20 richard | |
| 831 # Added transaction tests to test_db | |
| 832 # | |
| 833 # Revision 1.10 2001/12/03 21:33:39 richard | |
| 834 # Fixes so the tests use commit and not close | |
| 835 # | |
| 836 # Revision 1.9 2001/12/02 05:06:16 richard | |
| 837 # . We now use weakrefs in the Classes to keep the database reference, so | |
| 838 # the close() method on the database is no longer needed. | |
| 839 # I bumped the minimum python requirement up to 2.1 accordingly. | |
| 840 # . #487480 ] roundup-server | |
| 841 # . #487476 ] INSTALL.txt | |
| 842 # | |
| 843 # I also cleaned up the change message / post-edit stuff in the cgi client. | |
| 844 # There's now a clearly marked "TODO: append the change note" where I believe | |
| 845 # the change note should be added there. The "changes" list will obviously | |
| 846 # have to be modified to be a dict of the changes, or somesuch. | |
| 847 # | |
| 848 # More testing needed. | |
| 849 # | |
| 850 # Revision 1.8 2001/10/09 07:25:59 richard | |
| 851 # Added the Password property type. See "pydoc roundup.password" for | |
| 852 # implementation details. Have updated some of the documentation too. | |
| 853 # | |
| 854 # Revision 1.7 2001/08/29 06:23:59 richard | |
| 855 # Disabled the bsddb3 module entirely in the unit testing. See CHANGES for | |
| 856 # details. | |
| 857 # | |
| 858 # Revision 1.6 2001/08/07 00:24:43 richard | |
| 859 # stupid typo | |
| 860 # | |
| 861 # Revision 1.5 2001/08/07 00:15:51 richard | |
| 862 # Added the copyright/license notice to (nearly) all files at request of | |
| 863 # Bizar Software. | |
| 864 # | |
| 865 # Revision 1.4 2001/07/30 03:45:56 richard | |
| 866 # Added more DB to test_db. Can skip tests where imports fail. | |
| 867 # | |
| 868 # Revision 1.3 2001/07/29 07:01:39 richard | |
| 869 # Added vim command to all source so that we don't get no steenkin' tabs :) | |
| 870 # | |
| 871 # Revision 1.2 2001/07/29 04:09:20 richard | |
| 872 # Added the fabricated property "id" to all hyperdb classes. | |
| 873 # | |
| 874 # Revision 1.1 2001/07/27 06:55:07 richard | |
| 875 # moving tests -> test | |
| 876 # | |
| 877 # Revision 1.7 2001/07/27 06:26:43 richard | |
| 878 # oops - wasn't deleting the test dir after the read-only tests | |
| 879 # | |
| 880 # Revision 1.6 2001/07/27 06:23:59 richard | |
| 881 # consistency | |
| 882 # | |
| 883 # Revision 1.5 2001/07/27 06:23:09 richard | |
| 884 # Added some new hyperdb tests to make sure we raise the right exceptions. | |
| 885 # | |
| 886 # Revision 1.4 2001/07/25 04:34:31 richard | |
| 887 # Added id and log to tests files... | |
| 888 # | |
| 889 # | |
| 890 # vim: set filetype=python ts=4 sw=4 et si | 679 # vim: set filetype=python ts=4 sw=4 et si |
