comparison test/test_mailgw.py @ 1095:711f2ecee20f

unit tests pass again
author Richard Jones <richard@users.sourceforge.net>
date Tue, 10 Sep 2002 02:37:28 +0000
parents 854d45f8b745
children d77b86cc541b
comparison
equal deleted inserted replaced
1094:854d45f8b745 1095:711f2ecee20f
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.28 2002-09-10 01:27:13 richard Exp $ 11 # $Id: test_mailgw.py,v 1.29 2002-09-10 02:37:28 richard Exp $
12 12
13 import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib 13 import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib
14 14
15 # Note: Should parse emails according to RFC2822 instead of performing a 15 # Note: Should parse emails according to RFC2822 instead of performing a
16 # literal string comparision. Parsing the messages allows the tests to work for 16 # literal string comparision. Parsing the messages allows the tests to work for
78 init.initialise(self.dirname, 'sekrit') 78 init.initialise(self.dirname, 'sekrit')
79 # check we can load the package 79 # check we can load the package
80 self.instance = instance.open(self.dirname) 80 self.instance = instance.open(self.dirname)
81 # and open the database 81 # and open the database
82 self.db = self.instance.open('sekrit') 82 self.db = self.instance.open('sekrit')
83 self.db.user.create(username='Chef', address='chef@bork.bork.bork') 83 self.db.user.create(username='Chef', address='chef@bork.bork.bork',
84 self.db.user.create(username='richard', address='richard@test') 84 roles='User')
85 self.db.user.create(username='mary', address='mary@test') 85 self.db.user.create(username='richard', address='richard@test',
86 roles='User')
87 self.db.user.create(username='mary', address='mary@test',
88 roles='User')
86 self.db.user.create(username='john', address='john@test', 89 self.db.user.create(username='john', address='john@test',
87 alternate_addresses='jondoe@test\njohn.doe@test') 90 alternate_addresses='jondoe@test\njohn.doe@test', roles='User')
88 91
89 def tearDown(self): 92 def tearDown(self):
90 if os.path.exists(os.environ['SENDMAILDEBUG']): 93 if os.path.exists(os.environ['SENDMAILDEBUG']):
91 os.remove(os.environ['SENDMAILDEBUG']) 94 os.remove(os.environ['SENDMAILDEBUG'])
92 try: 95 try:
317 This is a followup 320 This is a followup
318 321
319 322
320 ---------- 323 ----------
321 assignedto: -> mary 324 assignedto: -> mary
322 nosy: +mary, john 325 nosy: +john, mary
323 status: unread -> chatting 326 status: unread -> chatting
324 _________________________________________________________________________ 327 _________________________________________________________________________
325 "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example> 328 "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
326 http://your.tracker.url.example/issue1 329 http://your.tracker.url.example/issue1
327 _________________________________________________________________________ 330 _________________________________________________________________________
363 This is a followup 366 This is a followup
364 367
365 368
366 ---------- 369 ----------
367 assignedto: -> mary 370 assignedto: -> mary
368 nosy: +mary, john 371 nosy: +john, mary
369 status: unread -> chatting 372 status: unread -> chatting
370 _________________________________________________________________________ 373 _________________________________________________________________________
371 "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example> 374 "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
372 http://your.tracker.url.example/issue1 375 http://your.tracker.url.example/issue1
373 _________________________________________________________________________ 376 _________________________________________________________________________

Roundup Issue Tracker: http://roundup-tracker.org/