Skip to content

Commit

Permalink
Added testcase for invalid email-address okfde#515
Browse files Browse the repository at this point in the history
  • Loading branch information
maxempoint committed Aug 5, 2022
1 parent fba98e5 commit 24aa6e5
Show file tree
Hide file tree
Showing 2 changed files with 476 additions and 0 deletions.
5 changes: 5 additions & 0 deletions froide/foirequest/tests/test_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ def test_html_only_mail(self):
self.assertIn(" ( https://", mail.body)
self.assertIn("*peter.mueller@kreis-steinfurt.de*", mail.body)

def test_invalid_mail_address(self):
with open(p("test_mail_14.txt"), "rb") as f:
mail = parse_email(f)
self.assertEqual('john.doe@example.com', mail.to[0][1])


class DeferredMessageTest(TestCase):
def setUp(self):
Expand Down

0 comments on commit 24aa6e5

Please sign in to comment.