Skip to content

Commit 3f4ccbd

Browse files
committed
🐛(smtp) fix tests to expect smtp_ip
1 parent 8c7a080 commit 3f4ccbd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/backend/core/tests/mda/test_outbound.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ def resolve_return_value(domain, record_type, **kwargs):
260260

261261
# Check first call - [email protected], [email protected], [email protected] to mx1.example.com
262262
assert sorted_calls[0] == call(
263-
smtp_host="1.1.0.9",
263+
smtp_host="mx1.example.com",
264+
smtp_ip="1.1.0.9",
264265
smtp_port=25,
265266
envelope_from=draft_message.sender.email,
266267
@@ -274,7 +275,8 @@ def resolve_return_value(domain, record_type, **kwargs):
274275

275276
# Check second call - [email protected], [email protected] retry to mx2.example.com
276277
assert sorted_calls[1] == call(
277-
smtp_host="1.2.0.9",
278+
smtp_host="mx2.example.com",
279+
smtp_ip="1.2.0.9",
278280
smtp_port=25,
279281
envelope_from=draft_message.sender.email,
280282
recipient_emails={"[email protected]", "[email protected]"},
@@ -288,7 +290,8 @@ def resolve_return_value(domain, record_type, **kwargs):
288290

289291
# Check third call - [email protected] to mx1.example2.com
290292
assert sorted_calls[2] == call(
291-
smtp_host="2.1.0.9",
293+
smtp_host="mx1.example2.com",
294+
smtp_ip="2.1.0.9",
292295
smtp_port=25,
293296
envelope_from=draft_message.sender.email,
294297
recipient_emails={"[email protected]"},
@@ -333,7 +336,8 @@ def smtp_return_value(*args, **kwargs):
333336
outbound.send_message(draft_message)
334337

335338
mock_smtp_send.assert_called_once_with(
336-
smtp_host="1.2.0.8",
339+
smtp_host="example2.com",
340+
smtp_ip="1.2.0.8",
337341
smtp_port=25,
338342
envelope_from=draft_message.sender.email,
339343
recipient_emails={"[email protected]"},

0 commit comments

Comments
 (0)