diff --git a/addons/payment/tests/common.py b/addons/payment/tests/common.py index bc7bf6681f1..45aa009d1a2 100644 --- a/addons/payment/tests/common.py +++ b/addons/payment/tests/common.py @@ -4,7 +4,6 @@ import logging from unittest.mock import patch from lxml import objectify -from werkzeug import urls from odoo.fields import Command from odoo.tools.misc import hmac as hmac_tool @@ -244,9 +243,6 @@ class PaymentCommon(AccountTestInvoicingCommon): access_token = hmac_tool(self.env(su=True), 'generate_access_token', token_str) return access_token - def _build_url(self, route): - return urls.url_join(self.base_url(), route) - def _extract_values_from_html_form(self, html_form): """ Extract the transaction rendering values from an HTML form. diff --git a/addons/payment/tests/http_common.py b/addons/payment/tests/http_common.py index 7f21d114684..2efbe083a9e 100644 --- a/addons/payment/tests/http_common.py +++ b/addons/payment/tests/http_common.py @@ -2,7 +2,9 @@ import json from uuid import uuid4 + from lxml import etree, objectify +from werkzeug import urls from odoo.tests import HttpCase @@ -19,6 +21,9 @@ class PaymentHttpCommon(PaymentCommon, HttpCase): # Helpers # ########### + def _build_url(self, route): + return urls.url_join(self.base_url(), route) + def _make_http_get_request(self, url, params=None): """ Make an HTTP GET request to the provided URL.