[Python-checkins] python/dist/src/Lib/email/test test_email.py,1.43,1.44
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Mon, 10 Mar 2003 21:04:56 -0800
Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory sc8-pr-cvs1:/tmp/cvs-serv4565
Modified Files:
test_email.py
Log Message:
Adjust tests for no newline appending to MIMEText.__init__()'s _text
argument.
Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** test_email.py 11 Mar 2003 04:31:37 -0000 1.43
--- test_email.py 11 Mar 2003 05:04:54 -0000 1.44
***************
*** 485,497 ****
eq = self.assertEqual
msg = MIMEText('hello world', _encoder=Encoders.encode_noop)
! eq(msg.get_payload(), 'hello world\n')
def test_encode_7bit(self):
eq = self.assertEqual
msg = MIMEText('hello world', _encoder=Encoders.encode_7or8bit)
! eq(msg.get_payload(), 'hello world\n')
eq(msg['content-transfer-encoding'], '7bit')
msg = MIMEText('hello \x7f world', _encoder=Encoders.encode_7or8bit)
! eq(msg.get_payload(), 'hello \x7f world\n')
eq(msg['content-transfer-encoding'], '7bit')
--- 485,497 ----
eq = self.assertEqual
msg = MIMEText('hello world', _encoder=Encoders.encode_noop)
! eq(msg.get_payload(), 'hello world')
def test_encode_7bit(self):
eq = self.assertEqual
msg = MIMEText('hello world', _encoder=Encoders.encode_7or8bit)
! eq(msg.get_payload(), 'hello world')
eq(msg['content-transfer-encoding'], '7bit')
msg = MIMEText('hello \x7f world', _encoder=Encoders.encode_7or8bit)
! eq(msg.get_payload(), 'hello \x7f world')
eq(msg['content-transfer-encoding'], '7bit')
***************
*** 499,503 ****
eq = self.assertEqual
msg = MIMEText('hello \x80 world', _encoder=Encoders.encode_7or8bit)
! eq(msg.get_payload(), 'hello \x80 world\n')
eq(msg['content-transfer-encoding'], '8bit')
--- 499,503 ----
eq = self.assertEqual
msg = MIMEText('hello \x80 world', _encoder=Encoders.encode_7or8bit)
! eq(msg.get_payload(), 'hello \x80 world')
eq(msg['content-transfer-encoding'], '8bit')
***************
*** 511,515 ****
eq = self.assertEqual
msg = MIMEText('hello world', _encoder=Encoders.encode_base64)
! eq(msg.get_payload(), 'aGVsbG8gd29ybGQK\n')
eq(msg['content-transfer-encoding'], 'base64')
--- 511,515 ----
eq = self.assertEqual
msg = MIMEText('hello world', _encoder=Encoders.encode_base64)
! eq(msg.get_payload(), 'aGVsbG8gd29ybGQ=')
eq(msg['content-transfer-encoding'], 'base64')
***************
*** 517,521 ****
eq = self.assertEqual
msg = MIMEText('hello world', _encoder=Encoders.encode_quopri)
! eq(msg.get_payload(), 'hello=20world\n')
eq(msg['content-transfer-encoding'], 'quoted-printable')
--- 517,521 ----
eq = self.assertEqual
msg = MIMEText('hello world', _encoder=Encoders.encode_quopri)
! eq(msg.get_payload(), 'hello=20world')
eq(msg['content-transfer-encoding'], 'quoted-printable')
***************
*** 1006,1010 ****
def test_payload(self):
! self.assertEqual(self._msg.get_payload(), 'hello there\n')
self.failUnless(not self._msg.is_multipart())
--- 1006,1010 ----
def test_payload(self):
! self.assertEqual(self._msg.get_payload(), 'hello there')
self.failUnless(not self._msg.is_multipart())
***************
*** 1124,1128 ****
hello world
-
--BOUNDARY--
''')
--- 1124,1127 ----
***************
*** 1152,1156 ****
hello world
-
--BOUNDARY--
''')
--- 1151,1154 ----
***************
*** 1472,1476 ****
One
-
--BOUNDARY
Content-Type: text/plain; charset="us-ascii"
--- 1470,1473 ----
***************
*** 1479,1483 ****
Two
-
--BOUNDARY--
""")
--- 1476,1479 ----