import textwrap import unittest import contextlib from email import policy from email import errors from test.test_email import TestEmailBase class TestDefectsBase: policy = policy.default raise_expected = False @contextlib.contextmanager def _raise_point(self, defect): yield def test_same_boundary_inner_outer(self): source = textwrap.dedent("""\ Subject: XX From: xx@xx.dk To: XX Mime-version: 1.0 Content-type: multipart/mixed; boundary="MS_Mac_OE_3071477847_720252_MIME_Part" --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: multipart/alternative; boundary="MS_Mac_OE_3071477847_720252_MIME_Part" --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable text --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable