MockBlob¶
- class safir.testing.gcs.MockBlob(name, expected_expiration=None)¶
Bases:
MockMock version of
google.cloud.storage.blob.Blob.- Parameters:
Methods Summary
generate_signed_url(*, version, expiration, ...)Generate a mock signed URL for testing.
Methods Documentation
- generate_signed_url(*, version, expiration, method, response_type=None, credentials=None)¶
Generate a mock signed URL for testing.
- Parameters:
version (
str) – Must bev4.expiration (
timedelta) – Must match theexpected_expirationargument to the constructor if it was given.method (
str) – Must beGET.response_type (
str|None, default:None) – May be anything and is ignored.credentials (
Any|None, default:None) – May be anything and is ignored.
- Returns:
Always returns
https://example.com/namewhere name is the name of the blob.- Return type: