@@ -229,7 +229,11 @@ def test_build_keyjar_usage():
229
229
230
230
def test_build_keyjar_missing (tmpdir ):
231
231
keys = [
232
- {"type" : "RSA" , "key" : os .path .join (tmpdir .dirname , "missing_file" ), "use" : ["enc" , "sig" ],}
232
+ {
233
+ "type" : "RSA" ,
234
+ "key" : os .path .join (tmpdir .dirname , "missing_file" ),
235
+ "use" : ["enc" , "sig" ],
236
+ }
233
237
]
234
238
235
239
key_jar = build_keyjar (keys )
@@ -247,7 +251,11 @@ def test_build_RSA_keyjar_from_file(tmpdir):
247
251
248
252
def test_build_EC_keyjar_missing (tmpdir ):
249
253
keys = [
250
- {"type" : "EC" , "key" : os .path .join (tmpdir .dirname , "missing_file" ), "use" : ["enc" , "sig" ],}
254
+ {
255
+ "type" : "EC" ,
256
+ "key" : os .path .join (tmpdir .dirname , "missing_file" ),
257
+ "use" : ["enc" , "sig" ],
258
+ }
251
259
]
252
260
253
261
key_jar = build_keyjar (keys )
@@ -303,7 +311,8 @@ def test_items(self):
303
311
),
304
312
)
305
313
ks .add_kb (
306
- "http://www.example.org" , keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
314
+ "http://www.example.org" ,
315
+ keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
307
316
)
308
317
309
318
assert len (ks .items ()) == 2
@@ -329,7 +338,8 @@ def test_issuer_extra_slash(self):
329
338
),
330
339
)
331
340
ks .add_kb (
332
- "http://www.example.org" , keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
341
+ "http://www.example.org" ,
342
+ keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
333
343
)
334
344
335
345
assert ks .get ("sig" , "RSA" , "http://www.example.org/" )
@@ -355,7 +365,8 @@ def test_issuer_missing_slash(self):
355
365
),
356
366
)
357
367
ks .add_kb (
358
- "http://www.example.org/" , keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
368
+ "http://www.example.org/" ,
369
+ keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
359
370
)
360
371
361
372
assert ks .get ("sig" , "RSA" , "http://www.example.org" )
@@ -381,7 +392,8 @@ def test_get_enc(self):
381
392
),
382
393
)
383
394
ks .add_kb (
384
- "http://www.example.org/" , keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
395
+ "http://www.example.org/" ,
396
+ keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
385
397
)
386
398
387
399
assert ks .get ("enc" , "oct" )
@@ -407,7 +419,8 @@ def test_get_enc_not_mine(self):
407
419
),
408
420
)
409
421
ks .add_kb (
410
- "http://www.example.org/" , keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
422
+ "http://www.example.org/" ,
423
+ keybundle_from_local_file (RSAKEY , "der" , ["ver" , "sig" ]),
411
424
)
412
425
413
426
assert ks .get ("enc" , "oct" , "http://www.example.org/" )
@@ -449,7 +462,8 @@ def test_provider(self):
449
462
kj = KeyJar ()
450
463
_url = "https://connect-op.herokuapp.com/jwks.json"
451
464
kj .load_keys (
452
- "https://connect-op.heroku.com" , jwks_uri = _url ,
465
+ "https://connect-op.heroku.com" ,
466
+ jwks_uri = _url ,
453
467
)
454
468
iss_keys = kj .get_issuer_keys ("https://connect-op.heroku.com" )
455
469
if not iss_keys :
@@ -968,7 +982,10 @@ def test_init_key_jar_update():
968
982
assert len (_keyjar_3 .get_signing_key ("EC" )) == 1
969
983
970
984
_keyjar_4 = init_key_jar (
971
- private_path = PRIVATE_FILE , key_defs = KEYSPEC_2 , public_path = PUBLIC_FILE , read_only = False ,
985
+ private_path = PRIVATE_FILE ,
986
+ key_defs = KEYSPEC_2 ,
987
+ public_path = PUBLIC_FILE ,
988
+ read_only = False ,
972
989
)
973
990
974
991
# Now it should
0 commit comments