changeset b90d38b0c12b in modules/stock_package_shipping_ups:5.0
details: 
https://hg.tryton.org/modules/stock_package_shipping_ups?cmd=changeset;node=b90d38b0c12b
description:
        Skip scenario that requires environment that is not set
        (grafted from 34db55154a67f585f9a2e8b8e6a2d0aeb01d0360)
diffstat:

 tests/test_shipping_ups.py |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r caa33d386d3f -r b90d38b0c12b tests/test_shipping_ups.py
--- a/tests/test_shipping_ups.py        Tue Feb 19 22:14:48 2019 +0100
+++ b/tests/test_shipping_ups.py        Fri Nov 02 20:07:30 2018 +0100
@@ -1,8 +1,9 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
 
+import doctest
+import os
 import unittest
-import doctest
 
 from trytond.tests.test_tryton import ModuleTestCase
 from trytond.tests.test_tryton import suite as test_suite
@@ -18,8 +19,12 @@
     suite = test_suite()
     suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
             ShippingUpsTestCase))
-    suite.addTests(doctest.DocFileSuite('scenario_shipping_ups.rst',
-            tearDown=doctest_teardown, encoding='utf-8',
-            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
-            checker=doctest_checker))
+    if (os.getenv('UPS_USER_ID')
+            and os.getenv('UPS_PASSWORD')
+            and os.getenv('UPS_LICENSE')
+            and os.getenv('UPS_ACCOUNT_NUMBER')):
+        suite.addTests(doctest.DocFileSuite('scenario_shipping_ups.rst',
+                tearDown=doctest_teardown, encoding='utf-8',
+                optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
+                checker=doctest_checker))
     return suite

Reply via email to