Skip to content

Commit 691e217

Browse files
author
Alexander Smishlajev
committed
testRegistrationConfirmation: remove CR at the end of the first line...
... of split "Subject:" header. i don't think it was intentional (there ain't no such thing on split "Content-Type:" line), and it breaks header parsing on windows (CR is treated as newline, i.e. we get two newlines in a row). trim trailing spaces; fix vim modeline
1 parent 00812f7 commit 691e217

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

test/test_mailgw.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# but WITHOUT ANY WARRANTY; without even the implied warranty of
99
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010
#
11-
# $Id: test_mailgw.py,v 1.69 2004-04-20 21:55:45 richard Exp $
11+
# $Id: test_mailgw.py,v 1.69.2.1 2004-09-29 09:16:09 a1s Exp $
1212

1313
# TODO: test bcc
1414

@@ -29,10 +29,10 @@ class Message(rfc822.Message):
2929
"""String-based Message class with equivalence test."""
3030
def __init__(self, s):
3131
rfc822.Message.__init__(self, StringIO(s.strip()))
32-
32+
3333
def __eq__(self, other):
3434
return (self.dict == other.dict and
35-
self.fp.read() == other.fp.read())
35+
self.fp.read() == other.fp.read())
3636

3737
class DiffHelper:
3838
def compareMessages(self, new, old):
@@ -60,7 +60,7 @@ def compareMessages(self, new, old):
6060
if res:
6161
res.insert(0, 'Generated message not correct (diff follows):')
6262
raise AssertionError, '\n'.join(res)
63-
63+
6464
def compareStrings(self, s2, s1):
6565
'''Note the reversal of s2 and s1 - difflib.SequenceMatcher wants
6666
the first to be the "original" but in the calls in this file,
@@ -135,7 +135,7 @@ def _handle_mail(self, message):
135135
# handler can close the db on us and open a new one
136136
self.db = handler.db
137137
return ret
138-
138+
139139
def _get_mail(self):
140140
f = open(SENDMAILDEBUG)
141141
try:
@@ -204,7 +204,7 @@ def testAlternateAddress(self):
204204
205205
This is a test submission of a new issue.
206206
''')
207-
userlist = self.db.user.list()
207+
userlist = self.db.user.list()
208208
assert not os.path.exists(SENDMAILDEBUG)
209209
self.assertEqual(userlist, self.db.user.list(),
210210
"user created when it shouldn't have been")
@@ -271,7 +271,7 @@ def testNewIssueAuthMsg(self):
271271
# '''With more than one part'''
272272
# see MultipartEnc tests: but if there is more than one part
273273
# we return a multipart/mixed and the boundary contains
274-
# the ip address of the test machine.
274+
# the ip address of the test machine.
275275

276276
# BUG should test some binary attamchent too.
277277

@@ -808,21 +808,21 @@ def testContentDisposition(self):
808808
Message-Id: <followup_dummy_id>
809809
In-Reply-To: <dummy_test_message_id>
810810
Subject: [issue1] Testing...
811-
Content-Type: multipart/mixed; boundary="bCsyhTFzCvuiizWE"
812-
Content-Disposition: inline
813-
814-
815-
--bCsyhTFzCvuiizWE
816-
Content-Type: text/plain; charset=us-ascii
817-
Content-Disposition: inline
811+
Content-Type: multipart/mixed; boundary="bCsyhTFzCvuiizWE"
812+
Content-Disposition: inline
818813
819-
test attachment binary
820814
821-
--bCsyhTFzCvuiizWE
822-
Content-Type: application/octet-stream
823-
Content-Disposition: attachment; filename="main.dvi"
815+
--bCsyhTFzCvuiizWE
816+
Content-Type: text/plain; charset=us-ascii
817+
Content-Disposition: inline
824818
825-
xxxxxx
819+
test attachment binary
820+
821+
--bCsyhTFzCvuiizWE
822+
Content-Type: application/octet-stream
823+
Content-Disposition: attachment; filename="main.dvi"
824+
825+
xxxxxx
826826
827827
--bCsyhTFzCvuiizWE--
828828
''')
@@ -950,7 +950,7 @@ def testRegistrationConfirmation(self):
950950
951951
Cc: richard@test
952952
Message-Id: <dummy_test_message_id>
953-
Subject: Re: Complete your registration to Roundup issue tracker
953+
Subject: Re: Complete your registration to Roundup issue tracker
954954
-- key %s
955955
956956
This is a test confirmation of registration.
@@ -967,7 +967,7 @@ def testFollowupOnNonIssue(self):
967967
In-Reply-To: <dummy_test_message_id>
968968
Subject: [keyword1] Testing... [name=Bar]
969969
970-
''')
970+
''')
971971
self.assertEqual(self.db.keyword.get('1', 'name'), 'Bar')
972972

973973
def testResentFrom(self):
@@ -1026,4 +1026,4 @@ def test_suite():
10261026
runner = unittest.TextTestRunner()
10271027
unittest.main(testRunner=runner)
10281028

1029-
# vim: set filetype=python ts=4 sw=4 et si
1029+
# vim: set filetype=python sts=4 sw=4 et si :

0 commit comments

Comments
 (0)