summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-10-12 14:23:37 -0400
committerTim Graham <timograham@gmail.com>2016-10-12 14:26:17 -0400
commitb2f9db1637021f5a0a0c201017f6536243ed203f (patch)
treeec984360a9569ebe5eb49c2081e0dc041436a4a1
parenta3a10f8abe43c443f217d75153f50b53fbe71be2 (diff)
Removed redundant usage of assertNotIn() in a mail test.
The Content-Transfer-Encoding header won't be repeated, so checking the header is sufficient.
-rw-r--r--tests/mail/tests.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index e680fb165a..bc0d8eabc9 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -554,7 +554,7 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
'Subject', 'UTF-8 encoded body', 'bounce@example.com', ['to@example.com'],
headers={'From': 'from@example.com'},
)
- self.assertNotIn(b'Content-Transfer-Encoding: base64', msg.message().as_bytes())
+ self.assertIn(b'Content-Transfer-Encoding: 7bit', msg.message().as_bytes())
# Ticket #11212
# Shouldn't use quoted printable, should detect it can represent content with 7 bit data
@@ -563,7 +563,6 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
headers={'From': 'from@example.com'},
)
s = msg.message().as_bytes()
- self.assertNotIn(b'Content-Transfer-Encoding: quoted-printable', s)
self.assertIn(b'Content-Transfer-Encoding: 7bit', s)
# Shouldn't use quoted printable, should detect it can represent content with 8 bit data
@@ -572,7 +571,6 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
headers={'From': 'from@example.com'},
)
s = msg.message().as_bytes()
- self.assertNotIn(b'Content-Transfer-Encoding: quoted-printable', s)
self.assertIn(b'Content-Transfer-Encoding: 8bit', s)
msg = EmailMessage(
@@ -580,7 +578,6 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
['to@example.com'], headers={'From': 'from@example.com'},
)
s = msg.message().as_bytes()
- self.assertNotIn(b'Content-Transfer-Encoding: quoted-printable', s)
self.assertIn(b'Content-Transfer-Encoding: 8bit', s)
def test_dont_base64_encode_message_rfc822(self):