From 869b18e4db3be57075cf0deb24d62b33f6c6879a Mon Sep 17 00:00:00 2001 From: krishnaa96 Date: Tue, 5 Jan 2021 11:05:17 +0530 Subject: Remove ca-cert from docker image CA cert can be directly used by the request library. So it is not needed to install in the base image Issue-ID: OPTFRA-891 Signed-off-by: krishnaa96 Change-Id: Ia7642cded9057148abcaf0f2f8c9e85d63a08012 --- test/osdf/utils/test_interfaces.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/osdf/utils/test_interfaces.py') diff --git a/test/osdf/utils/test_interfaces.py b/test/osdf/utils/test_interfaces.py index cdb3d7a..8d66e16 100644 --- a/test/osdf/utils/test_interfaces.py +++ b/test/osdf/utils/test_interfaces.py @@ -16,12 +16,13 @@ # ------------------------------------------------------------------------- # import requests -import unittest - from requests.models import Response -from osdf.utils.interfaces import RestClient, get_rest_client +import unittest from unittest.mock import patch +from osdf.utils.interfaces import get_rest_client +from osdf.utils.interfaces import RestClient + m1 = Response() m1._content = b'{"msg": "OK"}' @@ -39,7 +40,7 @@ class TestOsdfUtilsInterfaces(unittest.TestCase): def test_rc_request(self, mock_good_response): rc = RestClient() rc.add_headers({}) - rc.request(req_id="testReq") + rc.request(url="http://localhost", req_id="testReq") @patch('requests.request', return_value=mock_good_response) def test_rc_request_v1(self, mock_good_response): @@ -53,7 +54,7 @@ class TestOsdfUtilsInterfaces(unittest.TestCase): def test_rc_request_v2(self, mock_bad_response): rc = RestClient() try: - rc.request() + rc.request(url="http://localhost") except requests.RequestException: return raise Exception("Allows bad requests instead of raising exception") @@ -66,4 +67,3 @@ class TestOsdfUtilsInterfaces(unittest.TestCase): if __name__ == "__main__": unittest.main() - -- cgit 1.2.3-korg