| 2656 | eq(sfp.getvalue(), text) |
| 2657 | |
| 2658 | def test_no_nl_preamble(self): |
| 2659 | eq = self.ndiffAssertEqual |
| 2660 | msg = Message() |
| 2661 | msg['From'] = 'aperson@dom.ain' |
| 2662 | msg['To'] = 'bperson@dom.ain' |
| 2663 | msg['Subject'] = 'Test' |
| 2664 | msg.preamble = 'MIME message' |
| 2665 | msg.epilogue = '' |
| 2666 | msg1 = MIMEText('One') |
| 2667 | msg2 = MIMEText('Two') |
| 2668 | msg.add_header('Content-Type', 'multipart/mixed', boundary='BOUNDARY') |
| 2669 | msg.attach(msg1) |
| 2670 | msg.attach(msg2) |
| 2671 | eq(msg.as_string(), """\ |
| 2672 | From: aperson@dom.ain |
| 2673 | To: bperson@dom.ain |
| 2674 | Subject: Test |
| 2675 | Content-Type: multipart/mixed; boundary="BOUNDARY" |
| 2676 | |
| 2677 | MIME message |
| 2678 | --BOUNDARY |
| 2679 | Content-Type: text/plain; charset="us-ascii" |
| 2680 | MIME-Version: 1.0 |
| 2681 | Content-Transfer-Encoding: 7bit |
| 2682 | |
| 2683 | One |
| 2684 | --BOUNDARY |
| 2685 | Content-Type: text/plain; charset="us-ascii" |
| 2686 | MIME-Version: 1.0 |
| 2687 | Content-Transfer-Encoding: 7bit |
| 2688 | |
| 2689 | Two |
| 2690 | --BOUNDARY-- |
| 2691 | """) |
| 2692 | |
| 2693 | def test_default_type(self): |
| 2694 | eq = self.assertEqual |