File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -184,15 +184,17 @@ def fake_key_file(tmp_path_factory):
184
184
key_path = tmp_path_factory .mktemp (".sfapi_test1" , numbered = False ) / "key.pem"
185
185
186
186
# Make a fake key for testing
187
- key_path .write_text (f"""abcdefghijlmo
187
+ key_path .write_text (
188
+ f"""abcdefghijlmo
188
189
-----BEGIN RSA PRIVATE KEY-----
189
190
{ rsa .generate_private_key (public_exponent = 65537 , key_size = 2048 )}
190
191
-----END RSA PRIVATE KEY-----
191
- """ )
192
+ """
193
+ )
192
194
key_path .chmod (0o100600 )
193
195
yield key_path
194
196
# make sure to cleanup the test since we put a file in ~/.sfapi_test
195
- temp_path = ( Path ().home () / ".sfapi_test1" )
197
+ temp_path = Path ().home () / ".sfapi_test1"
196
198
if temp_path .exists ():
197
199
(temp_path / "key.pem" ).unlink (missing_ok = True )
198
200
temp_path .rmdir ()
@@ -207,7 +209,7 @@ def empty_key_file(tmp_path_factory):
207
209
key_path .chmod (0o100600 )
208
210
yield key_path
209
211
# make sure to cleanup the test since we put a file in ~/.sfapi_test
210
- temp_path = ( Path ().home () / ".sfapi_test2" )
212
+ temp_path = Path ().home () / ".sfapi_test2"
211
213
if temp_path .exists ():
212
214
(temp_path / "nokey.pem" ).unlink (missing_ok = True )
213
215
temp_path .rmdir ()
You can’t perform that action at this time.
0 commit comments