52d93d593b79e0cc3187bec2c83945d076ce565b
A recent discovery has led us to understand that actual HTTP requests to external services are performed even during non-external tests (even during at-install tests in fact). This PR puts a stop to that, by installing a requests mock which results in a ConnectionError for any request to an other host than localhost / 127.0.0.1. May add richer routing support in the future, but currently the easiest way to handle is to override `_request_handler` and return custom responses as needed when matching expected endpoints. Issues found so far: - `/link_tracker:TestMailRenderMixin` performs requests to all sorts of domains real and fake during testing, originally fixed in #128249 but re-fixed more generically here (the link tracker handles connection failure gracefully). - `partner_autocomplete` tests cause a request to clearbit to resolve the logo of the mock partner, failure is handled silently so nothing more is needed, this probably occurs in a few more locations (I didn't check every single log). - `/mass_mailing:TestMailingControllers.test_tracking_short_code` creates shortlinks to example.com, then opens the shortlink. While the shortlink is local, it redirects to an external site and the test is not happy when that fails. Intercept requests to that endpoint and returns successes. - `/website_sale:TestProductPictureController.test_resequence_images` touches the video_url of a product, which causes a call to `get_video_thumbnail`, which did handle (ignore) non-200 responses but not complete request failure. Add support for that (ignore `RequestException`). closes odoo/odoo#128497 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%