Skip to content

Commit

Permalink
[MIG] mail_outbound_static: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Dec 29, 2024
1 parent be6281b commit d2b3d9f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mail_outbound_static/tests/test_ir_mail_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
import os
from email import message_from_string
from unittest.mock import patch

import odoo.tools as tools
from odoo.exceptions import ValidationError
Expand Down Expand Up @@ -213,6 +214,8 @@ def test_03_from_outgoing_server_another(self):
),
)

@patch.dict(tools.config.options, {"smtp_from": "[email protected]"})
@patch.dict(tools.config.options, {"smtp_domain_whitelist": "example.com"})
def test_04_from_outgoing_server_none_use_config(self):
self._init_mail_server_domain_whilelist_based()
domain = "example.com"
Expand Down Expand Up @@ -241,6 +244,8 @@ def test_04_from_outgoing_server_none_use_config(self):
used_mail_server, f"using this mail server {used_mail_server.name}"
)

@patch.dict(tools.config.options, {"smtp_from": "[email protected]"})
@patch.dict(tools.config.options, {"smtp_domain_whitelist": "example.com"})
def test_05_from_outgoing_server_none_same_domain(self):
self._init_mail_server_domain_whilelist_based()

Expand Down

0 comments on commit d2b3d9f

Please sign in to comment.