Skip to content

Commit

Permalink
Adding a unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Price committed Jul 1, 2019
1 parent 59b3070 commit db550b9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions winrm/tests/test_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@ def test_build_session_cert_override_2(self):
t_default.build_session()
self.assertEqual('overridepath', t_default.session.verify)

def test_build_session_cert_override_3(self):
os.environ['CURL_CA_BUNDLE'] = 'path_to_CURL_CA_CERT'

t_default = transport.Transport(endpoint="https://example.com",
server_cert_validation='validate',
username='test',
password='test',
auth_method='basic',
ca_trust_path=None,
)
t_default.build_session()
self.assertEqual(True, t_default.session.verify)

def test_build_session_cert_ignore_1(self):
os.environ['REQUESTS_CA_BUNDLE'] = 'path_to_REQUESTS_CA_CERT'
os.environ['CURL_CA_BUNDLE'] = 'path_to_CURL_CA_CERT'
Expand Down

0 comments on commit db550b9

Please sign in to comment.