def test_get_variables_passes_down_ssl_verify_parameter(self, mock_http_client): api = Api(url='http://localhost', login_id='mylogin', api_key='apikey', ssl_verify='sslverify') def mock_auth(): return 'apitoken' api.authenticate = mock_auth api.get_variables('myvar', 'myvar2') self.verify_http_call(mock_http_client, HttpVerb.GET, ConjurEndpoint.BATCH_SECRETS, query={ 'variable_ids': 'default:variable:myvar,default:variable:myvar2' }, ssl_verify='sslverify')
def test_get_variables_converts_returned_data_to_expected_objects(self, mock_http_client): api = Api(url='http://localhost', login_id='mylogin', api_key='apikey', account='myaccount') def mock_auth(): return 'apitoken' api.authenticate = mock_auth output = api.get_variables('myvar', 'myvar2') self.assertEqual(output, { 'foo': 'a', 'bar': 'b', })