Mercurial > p > roundup > code
annotate test/__init__.py @ 575:2df17627528d
htmltemplate list() wasn't sorting...
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 22 Jan 2002 22:55:28 +0000 |
| parents | 6f45494f84af |
| children | d77b82588bf0 |
| 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 # |
| 564 | 18 # $Id: __init__.py,v 1.15 2002-01-22 00:12:20 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 |
|
561
13df980755fa
New tests for htmltemplate (well, it's a beginning)
Richard Jones <richard@users.sourceforge.net>
parents:
530
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(( |
| 564 | 29 test_dates.suite(), |
| 30 test_schema.suite(), | |
| 31 test_db.suite(), | |
| 32 test_init.suite(), | |
| 33 test_multipart.suite(), | |
| 34 test_mailsplit.suite(), | |
| 35 test_mailgw.suite(), | |
| 36 test_token.suite(), | |
|
561
13df980755fa
New tests for htmltemplate (well, it's a beginning)
Richard Jones <richard@users.sourceforge.net>
parents:
530
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() |
|
483
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
40 result = runner.run(suite) |
|
a090b3873d82
make setup abort if tests fail
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 $ |
| 564 | 45 # Revision 1.14 2002/01/22 00:12:06 richard |
| 46 # Wrote more unit tests for htmltemplate, and while I was at it, I polished | |
| 47 # off the implementation of some of the functions so they behave sanely. | |
| 48 # | |
|
563
0f58d6a35a8b
Wrote more unit tests for htmltemplate...
Richard Jones <richard@users.sourceforge.net>
parents:
561
diff
changeset
|
49 # Revision 1.13 2002/01/21 11:05:48 richard |
|
0f58d6a35a8b
Wrote more unit tests for htmltemplate...
Richard Jones <richard@users.sourceforge.net>
parents:
561
diff
changeset
|
50 # New tests for htmltemplate (well, it's a beginning) |
|
0f58d6a35a8b
Wrote more unit tests for htmltemplate...
Richard Jones <richard@users.sourceforge.net>
parents:
561
diff
changeset
|
51 # |
|
561
13df980755fa
New tests for htmltemplate (well, it's a beginning)
Richard Jones <richard@users.sourceforge.net>
parents:
530
diff
changeset
|
52 # Revision 1.12 2002/01/14 06:53:28 richard |
|
13df980755fa
New tests for htmltemplate (well, it's a beginning)
Richard Jones <richard@users.sourceforge.net>
parents:
530
diff
changeset
|
53 # had commented out some tests |
|
13df980755fa
New tests for htmltemplate (well, it's a beginning)
Richard Jones <richard@users.sourceforge.net>
parents:
530
diff
changeset
|
54 # |
|
530
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
55 # Revision 1.11 2002/01/14 02:20:15 richard |
|
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
56 # . changed all config accesses so they access either the instance or the |
|
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
57 # config attriubute on the db. This means that all config is obtained from |
|
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
58 # instance_config instead of the mish-mash of classes. This will make |
|
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
59 # switching to a ConfigParser setup easier too, I hope. |
|
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
60 # |
|
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
61 # At a minimum, this makes migration a _little_ easier (a lot easier in the |
|
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
62 # 0.5.0 switch, I hope!) |
|
074bac7fc308
had commented out some tests
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
63 # |
|
524
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
483
diff
changeset
|
64 # Revision 1.10 2002/01/05 02:09:46 richard |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
483
diff
changeset
|
65 # make setup abort if tests fail |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
483
diff
changeset
|
66 # |
|
483
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
67 # Revision 1.9 2002/01/02 02:31:38 richard |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
68 # Sorry for the huge checkin message - I was only intending to implement #496356 |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
69 # but I found a number of places where things had been broken by transactions: |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
70 # . modified ROUNDUPDBSENDMAILDEBUG to be SENDMAILDEBUG and hold a filename |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
71 # for _all_ roundup-generated smtp messages to be sent to. |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
72 # . the transaction cache had broken the roundupdb.Class set() reactors |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
73 # . newly-created author users in the mailgw weren't being committed to the db |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
74 # |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
75 # Stuff that made it into CHANGES.txt (ie. the stuff I was actually working |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
76 # on when I found that stuff :): |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
77 # . #496356 ] Use threading in messages |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
78 # . detectors were being registered multiple times |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
79 # . added tests for mailgw |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
80 # . much better attaching of erroneous messages in the mail gateway |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
81 # |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
82 # 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
|
83 # 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
|
84 # 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
|
85 # |
|
470
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
86 # 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
|
87 # stupid typo |
|
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
88 # |
| 214 | 89 # Revision 1.6 2001/08/07 00:15:51 richard |
| 90 # Added the copyright/license notice to (nearly) all files at request of | |
| 91 # Bizar Software. | |
| 92 # | |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
93 # 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
|
94 # 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
|
95 # |
|
205
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
96 # 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
|
97 # 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
|
98 # tests. Also snips signatures now too. |
|
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
99 # |
|
198
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
100 # 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
|
101 # 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
|
102 # |
|
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
|
103 # 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
|
104 # 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
|
105 # |
|
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
|
106 # 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
|
107 # 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
|
108 # |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
109 # Revision 1.3 2001/07/25 04:34:31 richard |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
110 # Added id and log to tests files... |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
111 # |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
112 # |
|
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
|
113 # vim: set filetype=python ts=4 sw=4 et si |
