Files
odoo_source/odoo/addons/base/tests/__init__.py
T
Julien Castiaux 3b493f5631 [IMP] base: test against a real SMTP server
A previous commit broke the smtp authentication using a TLS certificate
and we only figured it out after that a client created a support ticket
several weeks later. It turns out that there are no tests that validate
the various ways outgoing mail servers can be configured.

In this work, we add a test suite where a local smtp server is started
and controlled during the test execution. This makes it possible to test
all the possible outgoing mail server configurations, including TLS.

This work revealed several problems that have been sorted in other PRs,
a problem that is left to solve is to verify those certificates as shown
by the `test_man_in_the_middle` test. This will be sorted in a future
work.

We chose [aiosmtpd] which is a pure-python lightweight SMTP server that
aims at providing a programming API that is well-suited to be used
inside unittests.

task-3703209
opw-3640374
[aiosmtpd]: https://aiosmtpd.readthedocs.io

Part-of: odoo/odoo#151483
2024-04-24 07:55:42 +00:00

73 lines
2.1 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import common
from . import test_acl
from . import test_api
from . import test_barcode
from . import test_base
from . import test_basecase
from . import test_cache
from . import test_date_utils
from . import test_deprecation
from . import test_db_cursor
from . import test_display_name
from . import test_expression
from . import test_float
from . import test_format_address_mixin
from . import test_func
from . import test_http_case
from . import test_image
from . import test_avatar_mixin
from . import test_ir_actions
from . import test_ir_attachment
from . import test_ir_cron
from . import test_ir_filters
from . import test_ir_http
from . import test_ir_mail_server
from . import test_ir_mail_server_smtpd
from . import test_ir_model
from . import test_ir_module
from . import test_ir_sequence
from . import test_ir_sequence_date_range
from . import test_ir_default
from . import test_mail
from . import test_menu
from . import test_mimetypes
from . import test_misc
from . import test_module
from . import test_orm
from . import test_ormcache
from . import test_osv
from . import test_overrides
from . import test_qweb_field
from . import test_qweb
from . import test_res_config
from . import test_res_lang
from . import test_search
from . import test_split_table
from . import test_sql
from . import test_translate
from . import test_tz
# from . import test_uninstall # loop
from . import test_user_has_group
from . import test_views
from . import test_xmlrpc
from . import test_res_company
from . import test_res_currency
from . import test_res_country
from . import test_res_partner
from . import test_res_partner_bank
from . import test_res_users
from . import test_reports
from . import test_test_retry
from . import test_test_suite
from . import test_tests_tags
from . import test_transactions
from . import test_form_create
from . import test_cloc
from . import test_profiler
from . import test_pdf
from . import test_neutralize
from . import test_config_parameter
from . import test_ir_module_category