Mercurial > p > roundup > code
comparison test/test_mailgw.py @ 2089:93f03c6714d8
A few big changes in this commit:
1. The current indexer has been moved to backends/indexer_dbm in
anticipation of my writing an indexer_rdbms,
2. Changed indexer invocation during create / set to follow the pattern
set by the metakit backend, which was much cleaner, and
3. The "content" property of FileClass is now mutable in all but the
metakit backend.
Metakit needs to be changed to support the editing of "content". Hey, and
I learnt today that the metakit backend implements its own indexer. How
about that... :)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 19 Mar 2004 04:47:59 +0000 |
| parents | 18e77fe2a669 |
| children | 18addf2a8596 |
comparison
equal
deleted
inserted
replaced
| 2088:90769be53b4b | 2089:93f03c6714d8 |
|---|---|
| 6 # | 6 # |
| 7 # This module is distributed in the hope that it will be useful, | 7 # This module is distributed in the hope that it will be useful, |
| 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 10 # | 10 # |
| 11 # $Id: test_mailgw.py,v 1.64 2004-01-20 00:11:51 richard Exp $ | 11 # $Id: test_mailgw.py,v 1.65 2004-03-19 04:47:59 richard Exp $ |
| 12 | 12 |
| 13 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822 | 13 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822 |
| 14 | 14 |
| 15 from cStringIO import StringIO | 15 from cStringIO import StringIO |
| 16 | 16 |
| 924 self.assertEqual(rfc2822.encode_header(ascii_header), ascii_header) | 924 self.assertEqual(rfc2822.encode_header(ascii_header), ascii_header) |
| 925 self.assertEqual(rfc2822.encode_header(unicode_header), unicode_encoded) | 925 self.assertEqual(rfc2822.encode_header(unicode_header), unicode_encoded) |
| 926 | 926 |
| 927 def testRegistrationConfirmation(self): | 927 def testRegistrationConfirmation(self): |
| 928 otk = "Aj4euk4LZSAdwePohj90SME5SpopLETL" | 928 otk = "Aj4euk4LZSAdwePohj90SME5SpopLETL" |
| 929 self.db.otks.set(otk, username='johannes', __time='') | 929 self.db.getOTKManager().set(otk, username='johannes') |
| 930 self._handle_mail('''Content-Type: text/plain; | 930 self._handle_mail('''Content-Type: text/plain; |
| 931 charset="iso-8859-1" | 931 charset="iso-8859-1" |
| 932 From: Chef <chef@bork.bork.bork> | 932 From: Chef <chef@bork.bork.bork> |
| 933 To: issue_tracker@your.tracker.email.domain.example | 933 To: issue_tracker@your.tracker.email.domain.example |
| 934 Cc: richard@test | 934 Cc: richard@test |
