Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonjoyce committed Nov 27, 2023
1 parent ef49efe commit 1a18a5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pyas2lib/as2.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ def build(
self.message_id = f"{message_id}@{self.sender.domain}"
else:
self.message_id = (
email_utils.make_msgid(domain=self.sender.domain).lstrip("<").rstrip(">")
email_utils.make_msgid(domain=self.sender.domain)
.lstrip("<")
.rstrip(">")
)

# ensure the total length of the message id is no more than 255 characters
Expand Down
5 changes: 4 additions & 1 deletion pyas2lib/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ def test_invalid_message_id_length_raises_error(self):
very_long_message_id = "a" * 1000
with pytest.raises(ValueError) as excinfo:
out_message.build(self.test_data, message_id=very_long_message_id)
assert "Message ID must be no more than 255 characters for compatibility" in str(excinfo.value)
assert (
"Message ID must be no more than 255 characters for compatibility"
in str(excinfo.value)
)

def find_org(self, as2_id):
return self.org
Expand Down

0 comments on commit 1a18a5c

Please sign in to comment.