I have an API endpoint in which I am trying to write unit tests and I cannot understand how unit test calls the Google Cloud Storage Python client library ( https://cloud.google.com/appengine/docs/python/googlecloudstorageclient / ). I was hoping to find a stub somewhere in the library, and let it be as simple as unit testing the mail API ( https://cloud.google.com/appengine/docs/python/tools/localunittesting?hl=en ), but havenβt found anything yet. Any idea how to do this?
The list of available unit tests does not display GCS . You can submit function requests to their GitHub to add this functionality.
At the same time, using setUp for your tests to create files is probably your best bet.
Add
self.testbed.init_blobstore_stub()
to your unittests.