libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [47/51] [abbrv] libcloud git commit: remove certifi test
Date Mon, 09 Jan 2017 04:53:07 GMT
remove certifi test


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/bd404be0
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/bd404be0
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/bd404be0

Branch: refs/heads/trunk
Commit: bd404be03672ed5a7a0bddb242aa92f597fab957
Parents: a4ad8d4
Author: Anthony Shaw <anthonyshaw@apache.org>
Authored: Mon Jan 9 14:31:04 2017 +1100
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Mon Jan 9 14:31:04 2017 +1100

----------------------------------------------------------------------
 libcloud/test/test_httplib_ssl.py | 47 ----------------------------------
 1 file changed, 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/bd404be0/libcloud/test/test_httplib_ssl.py
----------------------------------------------------------------------
diff --git a/libcloud/test/test_httplib_ssl.py b/libcloud/test/test_httplib_ssl.py
index 1ed89ff..da0ba53 100644
--- a/libcloud/test/test_httplib_ssl.py
+++ b/libcloud/test/test_httplib_ssl.py
@@ -84,52 +84,5 @@ class TestHttpLibSSLTests(unittest.TestCase):
 
         self.assertTrue(self.httplib_object.ca_cert is not None)
 
-    def test_certifi_ca_bundle_in_search_path(self):
-        mock_certifi_ca_bundle_path = '/certifi/bundle/path'
-
-        # Certifi not available
-        import libcloud.security
-        reload(libcloud.security)
-
-        original_length = len(libcloud.security.CA_CERTS_PATH)
-
-        self.assertTrue(mock_certifi_ca_bundle_path not in
-                        libcloud.security.CA_CERTS_PATH)
-
-        # Certifi is available
-        mock_certifi = mock.Mock()
-        mock_certifi.where.return_value = mock_certifi_ca_bundle_path
-        sys.modules['certifi'] = mock_certifi
-
-        # Certifi CA bundle path should be injected at the begining of search list
-        import libcloud.security
-        reload(libcloud.security)
-
-        self.assertEqual(libcloud.security.CA_CERTS_PATH[0],
-                         mock_certifi_ca_bundle_path)
-        self.assertEqual(len(libcloud.security.CA_CERTS_PATH),
-                         (original_length + 1))
-
-        # Certifi is available, but USE_CERTIFI is set to False
-        os.environ['LIBCLOUD_SSL_USE_CERTIFI'] = 'false'
-
-        import libcloud.security
-        reload(libcloud.security)
-
-        self.assertTrue(mock_certifi_ca_bundle_path not in
-                        libcloud.security.CA_CERTS_PATH)
-        self.assertEqual(len(libcloud.security.CA_CERTS_PATH), original_length)
-
-        # And enabled
-        os.environ['LIBCLOUD_SSL_USE_CERTIFI'] = 'true'
-
-        import libcloud.security
-        reload(libcloud.security)
-
-        self.assertEqual(libcloud.security.CA_CERTS_PATH[0],
-                         mock_certifi_ca_bundle_path)
-        self.assertEqual(len(libcloud.security.CA_CERTS_PATH),
-                         (original_length + 1))
-
 if __name__ == '__main__':
     sys.exit(unittest.main())


Mime
View raw message