comparison test/test_mailgw.py @ 3939:63ab356dfcf9

Fix incorrect labelling of a change as a "new submission".
author Richard Jones <richard@users.sourceforge.net>
date Sun, 04 Nov 2007 05:11:19 +0000
parents 21420ba64b0d
children 1dd64778bc45
comparison
equal deleted inserted replaced
3938:083e280165a8 3939:63ab356dfcf9
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.89 2007-09-12 21:11:14 jpend Exp $ 11 # $Id: test_mailgw.py,v 1.90 2007-11-04 06:11:19 richard Exp $
12 12
13 # TODO: test bcc 13 # TODO: test bcc
14 14
15 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822, time 15 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822, time
16 16
445 oldvalues['assignedto'] = None 445 oldvalues['assignedto'] = None
446 self.db.issue.set('1', assignedto=self.chef_id) 446 self.db.issue.set('1', assignedto=self.chef_id)
447 self.db.commit() 447 self.db.commit()
448 self.db.issue.nosymessage('1', None, oldvalues) 448 self.db.issue.nosymessage('1', None, oldvalues)
449 449
450
451 new_mail = "" 450 new_mail = ""
452 for line in self._get_mail().split("\n"): 451 for line in self._get_mail().split("\n"):
453 if "Message-Id: " in line: 452 if "Message-Id: " in line:
454 continue 453 continue
455 if "Date: " in line: 454 if "Date: " in line:
456 continue 455 continue
457 new_mail+=line+"\n" 456 new_mail += line+"\n"
458 457
459 self.compareMessages(new_mail, """ 458 self.compareMessages(new_mail, """
460 FROM: roundup-admin@your.tracker.email.domain.example 459 FROM: roundup-admin@your.tracker.email.domain.example
461 TO: chef@bork.bork.bork, richard@test.test 460 TO: chef@bork.bork.bork, richard@test.test
462 Content-Type: text/plain; charset=utf-8 461 Content-Type: text/plain; charset=utf-8
480 _______________________________________________________________________ 479 _______________________________________________________________________
481 Roundup issue tracker <issue_tracker@your.tracker.email.domain.example> 480 Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
482 <http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1> 481 <http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1>
483 _______________________________________________________________________ 482 _______________________________________________________________________
484 """) 483 """)
485 484
486 485
487 # 486 #
488 # FOLLOWUP TITLE MATCH 487 # FOLLOWUP TITLE MATCH
489 # 488 #
490 def testFollowupTitleMatch(self): 489 def testFollowupTitleMatch(self):

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