1919from jsonschema .exceptions import SchemaError , ValidationError
2020from openapi_core import OpenAPI
2121from openapi_core .exceptions import OpenAPIError
22- from openapi_core .contrib .requests import RequestsOpenAPIRequest , \
23- RequestsOpenAPIResponse
22+ from openapi_core .contrib .requests import (
23+ RequestsOpenAPIRequest ,
24+ RequestsOpenAPIResponse ,
25+ )
2426from pytz import UnknownTimeZoneError , utc
2527from requests import request as client
2628from requests .auth import HTTPBasicAuth , HTTPDigestAuth , HTTPProxyAuth
@@ -47,7 +49,7 @@ def get_keyword_names(self):
4749 def set_client_cert (self , cert ):
4850 """*Sets the client cert for the requests.*
4951
50- The cert is either a path to a .pem file, or a JSON array, or a list
52+ The cert is either a path to a .pem file, or a JSON array, or a list, or a tuple
5153 having the cert path and the key path.
5254
5355 Values ``null`` and ``${None}`` can be used for clearing the cert.
@@ -56,6 +58,7 @@ def set_client_cert(self, cert):
5658
5759 | `Set Client Cert` | ${CURDIR}/client.pem |
5860 | `Set Client Cert` | ["${CURDIR}/client.cert", "${CURDIR}/client.key"] |
61+ | `Set Client Cert` | ("${CURDIR}/client.cert", "${CURDIR}/client.key") |
5962 | `Set Client Cert` | ${paths_list} |
6063 """
6164 self .request ["cert" ] = self ._input_client_cert (cert )
@@ -1447,7 +1450,9 @@ def _assert_spec(self, spec, response):
14471450 raise AssertionError (e ) from e
14481451 else :
14491452 try :
1450- validate_api_call (spec , raw_request = request , raw_response = response )
1453+ validate_api_call (
1454+ spec , raw_request = request , raw_response = response
1455+ )
14511456 except ValueError as e :
14521457 raise AssertionError (e )
14531458
0 commit comments