@@ -107,6 +107,8 @@ def to_test_request(
107107 self ,
108108 password : Optional [str ] = None ,
109109 token : Optional [str ] = None ,
110+ private_key : Optional [str ] = None ,
111+ private_key_passphrase : Optional [str ] = None ,
110112 ) -> TestDefinitionRequest :
111113 kwargs : dict [str , Any ] = {"schema" : self .schema }
112114 if password is not None :
@@ -115,6 +117,10 @@ def to_test_request(
115117 kwargs ["token" ] = token
116118 if self .username is not None :
117119 kwargs ["username" ] = self .username
120+ if private_key is not None :
121+ kwargs ["private_key" ] = private_key
122+ if private_key_passphrase is not None :
123+ kwargs ["private_key_passphrase" ] = private_key
118124 return TestDefinitionRequest (type = self .type , url = self .url , ** kwargs )
119125
120126 @staticmethod
@@ -127,12 +133,22 @@ def data_source_folder(data_sources_folder: Path, data_source_id: str) -> Path:
127133 create_directory (data_source_folder )
128134 return data_source_folder
129135
130- def to_api (self , password : Optional [str ] = None , token : Optional [str ] = None ) -> DeclarativeDataSource :
136+ def to_api (
137+ self ,
138+ password : Optional [str ] = None ,
139+ token : Optional [str ] = None ,
140+ private_key : Optional [str ] = None ,
141+ private_key_passphrase : Optional [str ] = None ,
142+ ) -> DeclarativeDataSource :
131143 dictionary = self ._get_snake_dict ()
132144 if password is not None :
133145 dictionary ["password" ] = password
134146 if token is not None :
135147 dictionary ["token" ] = token
148+ if private_key is not None :
149+ dictionary ["private_key" ] = private_key
150+ if private_key_passphrase is not None :
151+ dictionary ["private_key_passphrase" ] = private_key_passphrase
136152 return self .client_class ().from_dict (dictionary )
137153
138154 def store_to_disk (self , data_sources_folder : Path ) -> None :
0 commit comments