Skip to content

Local testing of pre-signed URLs #525

@mplough-kobold

Description

@mplough-kobold

#236 added basic pre-signed URL functionality. It's great not to have to dig into boto3 and do this manually.

According to the Testing code that uses cloudpathlib documentation:

In the cloudpathlib.local module, we provide "Local" classes that use the local filesystem in place of cloud storage. These classes are drop-in replacements for the normal cloud path classes, with the intent that you can use them as mock or monkeypatch substitutes in your tests.

Currently, the monkeypatching with Local classes results in the following error when attempting to test code that generates pre-signed URLs:

NotImplementedError: Cannot generate a presigned URL for a local path.

Would it be possible to add a basic implementation here to fulfill the documented intent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions