details: https://code.tryton.org/tryton/commit/d8089f958e22
branch: default
user: Cédric Krier <[email protected]>
date: Thu Sep 17 17:10:34 2026 +0200
description:
Test international shipping with UPS with and without different agent
account
diffstat:
modules/stock_package_shipping_ups/tests/scenario_stock_package_shipping_ups_international.json
| 4 ++++
modules/stock_package_shipping_ups/tests/scenario_stock_package_shipping_ups_international.rst
| 7 ++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diffs (32 lines):
diff -r 693c3aa598a4 -r d8089f958e22
modules/stock_package_shipping_ups/tests/scenario_stock_package_shipping_ups_international.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++
b/modules/stock_package_shipping_ups/tests/scenario_stock_package_shipping_ups_international.json
Thu Sep 17 17:10:34 2026 +0200
@@ -0,0 +1,4 @@
+[
+ {"agent_account": true}
+ ,{"agent_account": false}
+]
diff -r 693c3aa598a4 -r d8089f958e22
modules/stock_package_shipping_ups/tests/scenario_stock_package_shipping_ups_international.rst
---
a/modules/stock_package_shipping_ups/tests/scenario_stock_package_shipping_ups_international.rst
Thu Sep 17 17:02:06 2026 +0200
+++
b/modules/stock_package_shipping_ups/tests/scenario_stock_package_shipping_ups_international.rst
Thu Sep 17 17:10:34 2026 +0200
@@ -11,6 +11,8 @@
>>> from trytond.modules.company.tests.tools import create_company,
get_company
>>> from trytond.tests.tools import activate_modules, assertEqual
+ >>> agent_account = globals().get('agent_account', False)
+
Activate modules::
>>> config = activate_modules(
@@ -72,7 +74,10 @@
>>> agent_identifier.code = "CHE-123.456.788 IVA"
>>> agent_party.save()
>>> agent = Agent(party=agent_party)
- >>> agent.ups_account_number = os.getenv('UPS_ACCOUNT_NUMBER')
+ >>> agent.ups_account_number = (
+ ... os.getenv('UPS_ACCOUNT_NUMBER_AGENT')
+ ... if agent_account and os.getenv('UPS_ACCOUNT_NUMBER_AGENT')
+ ... else os.getenv('UPS_ACCOUNT_NUMBER'))
>>> agent.save()
>>> AgentSelection(to_country=switzerland, agent=agent).save()