Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storage.blob property time_created (timeCreated) #2933

Merged
merged 2 commits into from
Jan 13, 2017
Merged

Add storage.blob property time_created (timeCreated) #2933

merged 2 commits into from
Jan 13, 2017

Conversation

bivald
Copy link
Contributor

@bivald bivald commented Jan 12, 2017

This is a super small PR which adds storage.blob property time_created (timeCreated) which I found myself needing recently. It's basically a copy paste of time_deleted. Unit test added.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 12, 2017
@daspecster daspecster added the api: storage Issues related to the Cloud Storage API. label Jan 12, 2017
value = self._properties.get('timeCreated')
if value is not None:
return _rfc3339_to_datetime(value)

This comment was marked as spam.

@daspecster
Copy link
Contributor

@bivald Thanks!

Looks like the test doesn't cover the None case.
https://travis-ci.org/GoogleCloudPlatform/google-cloud-python/builds/191366039#L308

@bivald
Copy link
Contributor Author

bivald commented Jan 13, 2017

@daspecster I've added the missing unit test as well as fixed the lint-error, I realised that I've put the unit test in the wrong order so I've fixed that as well.

@daspecster daspecster merged commit 40fd881 into googleapis:master Jan 13, 2017
@daspecster
Copy link
Contributor

Thanks @bivald!

@bivald
Copy link
Contributor Author

bivald commented Jan 13, 2017

Thank you :)

richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants