Mercurial > p > roundup > code
annotate test/__init__.py @ 602:c242455d9b46 config-0-4-0-branch
Brought the config branch up to date with HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 06 Feb 2002 04:05:55 +0000 |
| parents | a1a44636bace |
| children | 13719594278b |
| rev | line source |
|---|---|
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
1 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
3 # This module is free software, and you may redistribute it and/or modify |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
4 # under the same terms as Python, so long as this copyright message and |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
5 # disclaimer are retained in their original form. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
6 # |
| 214 | 7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
10 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
11 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
17 # |
|
602
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
18 # $Id: __init__.py,v 1.9.2.1 2002-02-06 04:05:55 richard Exp $ |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
20 import unittest |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
21 import os, tempfile |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
22 os.environ['SENDMAILDEBUG'] = tempfile.mktemp() |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
23 |
|
198
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
24 import test_dates, test_schema, test_db, test_multipart, test_mailsplit |
|
602
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
25 import test_init, test_token, test_mailgw, test_htmltemplate |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
26 |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
27 def go(): |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
28 suite = unittest.TestSuite(( |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
29 test_dates.suite(), |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
30 test_schema.suite(), |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
31 test_db.suite(), |
|
205
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
32 test_init.suite(), |
|
110
19686b60e410
Multipart message class has the getPart method now. Added some tests for it.
Richard Jones <richard@users.sourceforge.net>
parents:
92
diff
changeset
|
33 test_multipart.suite(), |
|
198
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
34 test_mailsplit.suite(), |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
35 test_mailgw.suite(), |
|
470
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
36 test_token.suite(), |
|
602
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
37 test_htmltemplate.suite(), |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
38 )) |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
39 runner = unittest.TextTestRunner() |
|
602
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
40 result = runner.run(suite) |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
41 return result.wasSuccessful() |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
42 |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
43 # |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
44 # $Log: not supported by cvs2svn $ |
|
602
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
45 # Revision 1.15 2002/01/22 00:12:20 richard |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
46 # oops |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
47 # |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
48 # Revision 1.14 2002/01/22 00:12:06 richard |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
49 # Wrote more unit tests for htmltemplate, and while I was at it, I polished |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
50 # off the implementation of some of the functions so they behave sanely. |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
51 # |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
52 # Revision 1.13 2002/01/21 11:05:48 richard |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
53 # New tests for htmltemplate (well, it's a beginning) |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
54 # |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
55 # Revision 1.12 2002/01/14 06:53:28 richard |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
56 # had commented out some tests |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
57 # |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
58 # Revision 1.11 2002/01/14 02:20:15 richard |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
59 # . changed all config accesses so they access either the instance or the |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
60 # config attriubute on the db. This means that all config is obtained from |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
61 # instance_config instead of the mish-mash of classes. This will make |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
62 # switching to a ConfigParser setup easier too, I hope. |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
63 # |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
64 # At a minimum, this makes migration a _little_ easier (a lot easier in the |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
65 # 0.5.0 switch, I hope!) |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
66 # |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
67 # Revision 1.10 2002/01/05 02:09:46 richard |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
68 # make setup abort if tests fail |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
69 # |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
70 # Revision 1.9 2002/01/02 02:31:38 richard |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
71 # Sorry for the huge checkin message - I was only intending to implement #496356 |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
72 # but I found a number of places where things had been broken by transactions: |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
73 # . modified ROUNDUPDBSENDMAILDEBUG to be SENDMAILDEBUG and hold a filename |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
74 # for _all_ roundup-generated smtp messages to be sent to. |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
75 # . the transaction cache had broken the roundupdb.Class set() reactors |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
76 # . newly-created author users in the mailgw weren't being committed to the db |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
77 # |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
78 # Stuff that made it into CHANGES.txt (ie. the stuff I was actually working |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
79 # on when I found that stuff :): |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
80 # . #496356 ] Use threading in messages |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
81 # . detectors were being registered multiple times |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
82 # . added tests for mailgw |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
83 # . much better attaching of erroneous messages in the mail gateway |
|
c242455d9b46
Brought the config branch up to date with HEAD
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
84 # |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
85 # Revision 1.8 2001/12/31 05:09:20 richard |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
86 # Added better tokenising to roundup-admin - handles spaces and stuff. Can |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
87 # use quoting or backslashes. See the roundup.token pydoc. |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
88 # |
|
470
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
89 # Revision 1.7 2001/08/07 00:24:43 richard |
|
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
90 # stupid typo |
|
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
91 # |
| 214 | 92 # Revision 1.6 2001/08/07 00:15:51 richard |
| 93 # Added the copyright/license notice to (nearly) all files at request of | |
| 94 # Bizar Software. | |
| 95 # | |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
96 # Revision 1.5 2001/08/05 07:45:27 richard |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
97 # Added tests for instance initialisation |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
98 # |
|
205
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
99 # Revision 1.4 2001/08/03 07:18:22 richard |
|
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
100 # Implemented correct mail splitting (was taking a shortcut). Added unit |
|
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
101 # tests. Also snips signatures now too. |
|
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
102 # |
|
198
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
103 # Revision 1.3 2001/07/29 07:01:39 richard |
|
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
104 # Added vim command to all source so that we don't get no steenkin' tabs :) |
|
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
105 # |
|
127
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
110
diff
changeset
|
106 # Revision 1.2 2001/07/28 06:43:02 richard |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
110
diff
changeset
|
107 # Multipart message class has the getPart method now. Added some tests for it. |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
110
diff
changeset
|
108 # |
|
110
19686b60e410
Multipart message class has the getPart method now. Added some tests for it.
Richard Jones <richard@users.sourceforge.net>
parents:
92
diff
changeset
|
109 # Revision 1.1 2001/07/27 06:55:07 richard |
|
19686b60e410
Multipart message class has the getPart method now. Added some tests for it.
Richard Jones <richard@users.sourceforge.net>
parents:
92
diff
changeset
|
110 # moving tests -> test |
|
19686b60e410
Multipart message class has the getPart method now. Added some tests for it.
Richard Jones <richard@users.sourceforge.net>
parents:
92
diff
changeset
|
111 # |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
112 # Revision 1.3 2001/07/25 04:34:31 richard |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
113 # Added id and log to tests files... |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
114 # |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
115 # |
|
127
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
110
diff
changeset
|
116 # vim: set filetype=python ts=4 sw=4 et si |
