summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_https.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-04-26 08:22:03 -0500
committerJohn Estabrook <jestabro@vyos.io>2022-04-26 13:49:22 -0500
commit846098fd8a2e2b7025f6976e26e8b21f4ebe2466 (patch)
tree979cf8c8318f42810f9ecca94446ae01d3d3f884 /smoketest/scripts/cli/test_service_https.py
parentec3e1e43d24b823c5804ba80cdcbbfec25f7ea3a (diff)
downloadvyos-1x-846098fd8a2e2b7025f6976e26e8b21f4ebe2466.tar.gz
vyos-1x-846098fd8a2e2b7025f6976e26e8b21f4ebe2466.zip
smoketest: http: add decorator to suppress warnings locally
Diffstat (limited to 'smoketest/scripts/cli/test_service_https.py')
-rwxr-xr-xsmoketest/scripts/cli/test_service_https.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/test_service_https.py b/smoketest/scripts/cli/test_service_https.py
index 9413d22d1..71fb3e177 100755
--- a/smoketest/scripts/cli/test_service_https.py
+++ b/smoketest/scripts/cli/test_service_https.py
@@ -15,16 +15,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import unittest
-import urllib3
from requests import request
+from urllib3.exceptions import InsecureRequestWarning
from base_vyostest_shim import VyOSUnitTestSHIM
+from base_vyostest_shim import ignore_warning
from vyos.util import read_file
from vyos.util import run
-urllib3.disable_warnings()
-
base_path = ['service', 'https']
pki_base = ['pki']
@@ -100,6 +99,7 @@ class TestHTTPSService(VyOSUnitTestSHIM.TestCase):
ret = run('sudo /usr/sbin/nginx -t')
self.assertEqual(ret, 0)
+ @ignore_warning(InsecureRequestWarning)
def test_api_auth(self):
vhost_id = 'example'
address = '127.0.0.1'