def test_with_item(wrapped_cmp): config = CryptoConfig(materials_provider=wrapped_cmp, encryption_context=EncryptionContext(attributes={}), attribute_actions=AttributeActions()) item = {'test': 'item', 'with': 'some data'} new_config = config.with_item(item) assert config.encryption_context.attributes == {} assert new_config.encryption_context.attributes == item
def test_with_item(wrapped_cmp): config = CryptoConfig( materials_provider=wrapped_cmp, encryption_context=EncryptionContext(attributes={}), attribute_actions=AttributeActions(), ) item = {"test": "item", "with": "some data"} new_config = config.with_item(item) assert config.encryption_context.attributes == {} assert new_config.encryption_context.attributes == item