def test_catch_bad_destination_requests_file(tmpdir): destination = tmpdir.join("dir1", "dir2", "file") with pytest.raises(BadUserArgumentError) as excinfo: aws_encryption_sdk_cli._catch_bad_destination_requests( str(destination)) assert excinfo.match( r"If destination is a file, the immediate parent directory must already exist." )
def test_catch_bad_destination_requests_dir(tmpdir): aws_encryption_sdk_cli._catch_bad_destination_requests(str(tmpdir))
def test_catch_bad_destination_requests_stdout(): aws_encryption_sdk_cli._catch_bad_destination_requests("-")