def test_attributes_fail(encryption_context, frame_length): with pytest.raises(TypeError): EncryptorConfig(source='', key_provider=MagicMock(__class__=MasterKey), encryption_context=encryption_context, algorithm=MagicMock(__class__=Algorithm), frame_length=frame_length)
def test_encryptor_config_defaults(): test = EncryptorConfig(**BASE_KWARGS) assert test.encryption_context == {} assert test.algorithm is None assert test.frame_length == FRAME_LENGTH
def test_attributes_defaults(): test = EncryptorConfig(source='', key_provider=MagicMock(__class__=MasterKey)) assert test.encryption_context == {} assert test.algorithm is None assert test.frame_length == FRAME_LENGTH