Skip to content

Commit

Permalink
HOTFIX Sendmail tests linting (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
SorenSpicknall authored Jul 28, 2022
1 parent 686bb07 commit a600937
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_sendmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_creates_multipart_message(self, dummy_sendmail):

def test_can_handle_html(self, dummy_sendmail):
message = dummy_sendmail._create_message_attachments("from", "to", "subject", "text", [],
message_html="html")
message_html="html")
assert len(message.get_payload()) == 2
assert message.get_payload()[0].get_payload() == "text"
assert message.get_payload()[0].get_content_type() == "text/plain"
Expand All @@ -91,7 +91,7 @@ def test_properly_detects_file_types(self, tmp_path, dummy_sendmail, filename, e
filename = tmp_path / filename
filename.write_bytes(b"Parsons")
message = dummy_sendmail._create_message_attachments("from", "to", "subject", "text",
[filename])
[filename])
assert len(message.get_payload()) == 2 # text body plus attachment
assert isinstance(message.get_payload()[1], expected_type)

Expand All @@ -101,7 +101,7 @@ def test_works_with_buffers(self, dummy_sendmail, buffer):
if buffer is io.BytesIO:
value = b"Parsons"
message = dummy_sendmail._create_message_attachments("from", "to", "subject", "text",
[buffer(value)])
[buffer(value)])
assert len(message.get_payload()) == 2 # text body plus attachment
assert isinstance(message.get_payload()[1], MIMEApplication)

Expand Down

0 comments on commit a600937

Please sign in to comment.