libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [46/51] [abbrv] libcloud git commit: remove certifi test
Date Mon, 09 Jan 2017 04:53:06 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/5cf1f8fc
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5cf1f8fc
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5cf1f8fc

Branch: refs/heads/trunk
Commit: 5cf1f8fc74f58d84e6fa81eabedbaf652c5ba2b2
Parents: c06497f
Author: Anthony Shaw <anthonyshaw@apache.org>
Authored: Mon Jan 9 14:26:24 2017 +1100
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Mon Jan 9 14:26:24 2017 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5cf1f8fc/libcloud/test/test_httplib_ssl.py
----------------------------------------------------------------------
diff --git a/libcloud/test/test_httplib_ssl.py b/libcloud/test/test_httplib_ssl.py
index f94f737..c67b224 100644
--- a/libcloud/test/test_httplib_ssl.py
+++ b/libcloud/test/test_httplib_ssl.py
@@ -162,53 +162,5 @@ class TestHttpLibSSLTests(unittest.TestCase):
         self.assertEqual(e.errno, 105)
         self.assertTrue('Some random error' in str(e))
 
-    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