diff --git a/addons/iap/__manifest__.py b/addons/iap/__manifest__.py index 8a7a8445d59..d7e0309b86d 100644 --- a/addons/iap/__manifest__.py +++ b/addons/iap/__manifest__.py @@ -25,9 +25,6 @@ to support In-App purchases inside Odoo. """, 'iap/static/src/**/*.js', 'iap/static/src/**/*.xml', ], - 'web.tests_assets': [ - 'iap/static/tests/**/*', - ], }, 'license': 'LGPL-3', } diff --git a/addons/iap/static/tests/helpers/mock_server.js b/addons/iap/static/tests/helpers/mock_server.js deleted file mode 100644 index 7d59e269587..00000000000 --- a/addons/iap/static/tests/helpers/mock_server.js +++ /dev/null @@ -1,47 +0,0 @@ -odoo.define('iap/static/tests/helpers/mock_server.js', function (require) { -"use strict"; - -const MockServer = require('web.MockServer'); - -MockServer.include({ - //-------------------------------------------------------------------------- - // Private - //-------------------------------------------------------------------------- - - /** - * @override - */ - async _performRpc(route, args) { - if (args.model === 'iap.account' && args.method === 'get_credits_url') { - const service_name = args.args[0] || args.kwargs.service_name; - const base_url = args.args[1] || args.kwargs.base_url; - const credit = args.args[2] !== undefined ? args.args[2] : args.kwargs.credit; - const trial = args.args[3] !== undefined ? args.args[3] : args.kwargs.trial; - return this._mockIapAccountGetCreditsUrl(service_name, base_url, credit, trial); - } - return this._super(...arguments); - }, - - //-------------------------------------------------------------------------- - // Private Mocked Routes - //-------------------------------------------------------------------------- - - /** - * Simulates `get_credits_url` on `iap.account`. - * - * @private - * @param {string} service_name - * @param {string} [base_url=''] - * @param {number} [credit=0] - * @param {boolean} [trial=false] - * @returns {string} - */ - _mockIapAccountGetCreditsUrl(service_name, base_url = '', credit = 0, trial = false) { - // This mock could be improved, in particular by returning an URL that - // is actually mocked here and including all params, but it is not done - // due to URL not being used in any test at the time of this comment. - return base_url + '/random/url?service_name=' + service_name; - }, -}); - -});