@@ -180,19 +180,19 @@ def access_token():
180
180
181
181
@pytest .fixture
182
182
def fake_key_file (tmp_path_factory ):
183
- tmp_path_factory ._basetemp = Path ().home ()
184
- key_path = tmp_path_factory .mktemp (".sfapi_test1" , numbered = False ) / "key.pem"
185
-
186
- # Make a fake key for testing
187
- key_path .write_text (
188
- f"""abcdefghijlmo
189
- -----BEGIN RSA PRIVATE KEY-----
190
- { rsa .generate_private_key (public_exponent = 65537 , key_size = 2048 )}
191
- -----END RSA PRIVATE KEY-----
192
- """
193
- )
194
- key_path .chmod (0o100600 )
195
183
try :
184
+ tmp_path_factory ._basetemp = Path ().home ()
185
+ key_path = tmp_path_factory .mktemp (".sfapi_test1" , numbered = False ) / "key.pem"
186
+
187
+ # Make a fake key for testing
188
+ key_path .write_text (
189
+ f"""abcdefghijlmo
190
+ -----BEGIN RSA PRIVATE KEY-----
191
+ { rsa .generate_private_key (public_exponent = 65537 , key_size = 2048 )}
192
+ -----END RSA PRIVATE KEY-----
193
+ """
194
+ )
195
+ key_path .chmod (0o100600 )
196
196
yield key_path
197
197
finally :
198
198
# make sure to cleanup the test since we put a file in ~/.sfapi_test
@@ -204,12 +204,12 @@ def fake_key_file(tmp_path_factory):
204
204
205
205
@pytest .fixture
206
206
def empty_key_file (tmp_path_factory ):
207
- tmp_path_factory ._basetemp = Path ().home ()
208
- key_path = tmp_path_factory .mktemp (".sfapi_test2" , numbered = False ) / "nokey.pem"
209
- # Makes an empty key
210
- key_path .write_text ("" )
211
- key_path .chmod (0o100600 )
212
207
try :
208
+ tmp_path_factory ._basetemp = Path ().home ()
209
+ key_path = tmp_path_factory .mktemp (".sfapi_test2" , numbered = False ) / "nokey.pem"
210
+ # Makes an empty key
211
+ key_path .write_text ("" )
212
+ key_path .chmod (0o100600 )
213
213
yield key_path
214
214
finally :
215
215
# make sure to cleanup the test since we put a file in ~/.sfapi_test
0 commit comments