Tests: fix Python 3.13 email.utils.make_msgid mocking

Python 3.13 changes where email.utils imports socket for make_msgid.
This commit is contained in:
Mike Edmunds
2024-08-07 14:08:13 -07:00
parent ae6d730c46
commit 7779920e9b

View File

@@ -13,7 +13,7 @@ class InlineImageTests(AnymailTestMixin, SimpleTestCase):
self.message = EmailMultiAlternatives()
super().setUp()
@patch("email.utils.socket.getfqdn")
@patch("socket.getfqdn")
def test_default_domain(self, mock_getfqdn):
"""The default Content-ID domain should *not* use local hostname"""
# (This avoids problems with ESPs that re-use Content-ID as attachment