Skip to content

Commit aba80d8

Browse files
committed
chore: simplify test parametrization
1 parent f9999fc commit aba80d8

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

test/functional/test_client.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -486,15 +486,9 @@ def test_encryption_cycle_raw_mkp_openssl_102_plus(
486486
run_raw_provider_check(caplog, encrypt_param_name, encrypting_provider, decrypt_param_name, decrypting_provider)
487487

488488

489-
@pytest.mark.parametrize(
490-
"frame_length, algorithm, encryption_context",
491-
[
492-
[frame_length, algorithm_suite, encryption_context]
493-
for frame_length in VALUES["frame_lengths"]
494-
for algorithm_suite in Algorithm
495-
for encryption_context in [{}, VALUES["encryption_context"]]
496-
],
497-
)
489+
@pytest.mark.parametrize("frame_length", VALUES["frame_lengths"])
490+
@pytest.mark.parametrize("algorithm", Algorithm)
491+
@pytest.mark.parametrize("encryption_context", [{}, VALUES["encryption_context"]])
498492
def test_encryption_cycle_oneshot_kms(frame_length, algorithm, encryption_context):
499493
key_provider = fake_kms_key_provider(algorithm.kdf_input_len)
500494

@@ -511,15 +505,9 @@ def test_encryption_cycle_oneshot_kms(frame_length, algorithm, encryption_contex
511505
assert plaintext == VALUES["plaintext_128"] * 10
512506

513507

514-
@pytest.mark.parametrize(
515-
"frame_length, algorithm, encryption_context",
516-
[
517-
[frame_length, algorithm_suite, encryption_context]
518-
for frame_length in VALUES["frame_lengths"]
519-
for algorithm_suite in Algorithm
520-
for encryption_context in [{}, VALUES["encryption_context"]]
521-
],
522-
)
508+
@pytest.mark.parametrize("frame_length", VALUES["frame_lengths"])
509+
@pytest.mark.parametrize("algorithm", Algorithm)
510+
@pytest.mark.parametrize("encryption_context", [{}, VALUES["encryption_context"]])
523511
def test_encryption_cycle_stream_kms(frame_length, algorithm, encryption_context):
524512
key_provider = fake_kms_key_provider(algorithm.kdf_input_len)
525513

0 commit comments

Comments
 (0)