test_io_handling.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:aws-encryption-sdk-cli 作者: awslabs 项目源码 文件源码
def test_process_single_file_destination_is_symlink_to_source(
        tmpdir,
        patch_process_single_operation,
        standard_handler
):
    source = tmpdir.join('source')
    source.write('some data')
    destination = str(tmpdir.join('destination'))
    os.symlink(str(source), destination)

    with patch('aws_encryption_sdk_cli.internal.io_handling.open', create=True) as mock_open:
        standard_handler.process_single_file(
            stream_args=sentinel.stream_args,
            source=str(source),
            destination=destination
        )

    assert not mock_open.called
    assert not patch_process_single_operation.called
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号