Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOTFIX Sendmail tests linting #721

Merged
merged 1 commit into from
Jul 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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