-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
tests/scaffoldings/dotd/custom/scripts/test_smtp_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/local/bin/python-odoo-shell | ||
from odoo.exceptions import UserError | ||
from odoo.tools import config | ||
|
||
assert config.get("email_from") == "[email protected]" | ||
assert config.get("smtp_password") is False | ||
assert config.get("smtp_port") == 1025 | ||
assert config.get("smtp_server") == "mailhog" | ||
assert config.get("smtp_ssl") is False | ||
assert config.get("smtp_user") is False | ||
|
||
try: | ||
env["ir.mail_server"].test_smtp_connection() | ||
except UserError as msg: | ||
assert "Connection Test Succeeded!" in msg.args[0] | ||
else: | ||
raise Exception("This shouldn't happen :/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,13 @@ services: | |
LOG_LEVEL: DEBUG | ||
tty: true | ||
environment: | ||
EMAIL_FROM: [email protected] | ||
PGUSER: another_odoo | ||
PGPASSWORD: anotherodoopassword | ||
PGHOST: postgresql | ||
PGDATABASE: ${DBNAME:-prod} | ||
SMTP_SERVER: mailhog | ||
SMTP_PORT: 1025 # MailHog default | ||
depends_on: | ||
- postgresql | ||
volumes: | ||
|
@@ -27,6 +30,9 @@ services: | |
volumes: | ||
- db:/var/lib/postgresql/data:z | ||
|
||
mailhog: | ||
image: mailhog/mailhog | ||
|
||
volumes: | ||
db: | ||
filestore: |