Skip to content

Commit 709fb3a

Browse files
cleanup
1 parent 5393825 commit 709fb3a

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

test/unit/test_streaming_client_stream_decryptor.py

-39
Original file line numberDiff line numberDiff line change
@@ -365,45 +365,6 @@ def test_GIVEN_verification_key_AND_has_mpl_AND_has_MPLCMM_WHEN_read_header_THEN
365365
algorithm=self.mock_header.algorithm, encoded_point=mock_b64encoding()
366366
)
367367

368-
@patch("aws_encryption_sdk.streaming_client.derive_data_encryption_key")
369-
@patch("aws_encryption_sdk.streaming_client.DecryptionMaterialsRequest")
370-
@patch("aws_encryption_sdk.streaming_client.Verifier")
371-
# Given: no MPL
372-
@pytest.mark.skipif(HAS_MPL, reason="Test should only be executed without MPL in installation")
373-
def test_GIVEN_decrypt_config_has_ec_WHEN_read_header_THEN_calls_decrypt_materials_with_reproduced_ec(
374-
self,
375-
mock_verifier,
376-
mock_decrypt_materials_request,
377-
*_,
378-
):
379-
380-
mock_verifier_instance = MagicMock()
381-
mock_verifier.from_key_bytes.return_value = mock_verifier_instance
382-
ct_stream = io.BytesIO(VALUES["data_128"])
383-
mock_commitment_policy = MagicMock(__class__=CommitmentPolicy)
384-
test_decryptor = StreamDecryptor(
385-
materials_manager=self.mock_materials_manager,
386-
source=ct_stream,
387-
commitment_policy=mock_commitment_policy,
388-
)
389-
test_decryptor.source_stream = ct_stream
390-
test_decryptor._stream_length = len(VALUES["data_128"])
391-
# Given: self.config has "encryption_context"
392-
any_reproduced_ec = {"some": "ec"}
393-
test_decryptor.config.encryption_context = any_reproduced_ec
394-
395-
# When: read header
396-
test_decryptor._read_header()
397-
398-
# Then: calls decrypt_materials with reproduced_encryption_context
399-
mock_decrypt_materials_request.assert_called_once_with(
400-
encrypted_data_keys=self.mock_header.encrypted_data_keys,
401-
algorithm=self.mock_header.algorithm,
402-
encryption_context=sentinel.encryption_context,
403-
commitment_policy=mock_commitment_policy,
404-
reproduced_encryption_context=any_reproduced_ec,
405-
)
406-
407368
@patch("aws_encryption_sdk.streaming_client.DecryptionMaterialsRequest")
408369
@patch("aws_encryption_sdk.streaming_client.derive_data_encryption_key")
409370
@patch("aws_encryption_sdk.streaming_client.Verifier")

0 commit comments

Comments
 (0)