Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11)

Unified Diff: Lib/test/test_email/test_email.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_dis.py ('k') | Lib/test/test_email/test_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_email/test_email.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/test/test_email/test_email.py Mon Jul 25 09:47:18 2011 -0400
@@ -1809,51 +1809,6 @@
unless(isinstance(self.get_defects(msg)[1],
errors.MultipartInvariantViolationDefect))
- multipart_msg = textwrap.dedent("""\
- Date: Wed, 14 Nov 2007 12:56:23 GMT
- From: foo@bar.invalid
- To: foo@bar.invalid
- Subject: Content-Transfer-Encoding: base64 and multipart
- MIME-Version: 1.0
- Content-Type: multipart/mixed;
- boundary="===============3344438784458119861=="{}
-
- --===============3344438784458119861==
- Content-Type: text/plain
-
- Test message
-
- --===============3344438784458119861==
- Content-Type: application/octet-stream
- Content-Transfer-Encoding: base64
-
- YWJj
-
- --===============3344438784458119861==--
- """)
-
- def test_multipart_invalid_cte(self):
- msg = email.message_from_string(
- self.multipart_msg.format("\nContent-Transfer-Encoding: base64"),
- policy = self.policy)
- self.assertEqual(len(self.get_defects(msg)), 1)
- self.assertIsInstance(self.get_defects(msg)[0],
- errors.InvalidMultipartContentTransferEncodingDefect)
-
- def test_multipart_no_cte_no_defect(self):
- msg = email.message_from_string(
- self.multipart_msg.format(''),
- policy = self.policy)
- self.assertEqual(len(self.get_defects(msg)), 0)
-
- def test_multipart_valid_cte_no_defect(self):
- for cte in ('7bit', '8bit', 'BINary'):
- msg = email.message_from_string(
- self.multipart_msg.format(
- "\nContent-Transfer-Encoding: {}".format(cte)),
- policy = self.policy)
- self.assertEqual(len(self.get_defects(msg)), 0)
-
def test_invalid_content_type(self):
eq = self.assertEqual
neq = self.ndiffAssertEqual
« no previous file with comments | « Lib/test/test_dis.py ('k') | Lib/test/test_email/test_utils.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+