I have an API endpoint I'm trying to write unit tests for and I can't seem to figure out how to unit test the Python Google Cloud Storage client library calls (https://cloud.google.com/appengine/docs/python/googlecloudstorageclient/). I was hoping to find a stub somewhere in the library and have it be as simple as unit testing the mail API would be (https://cloud.google.com/appengine/docs/python/tools/localunittesting?hl=en), but haven't found anything yet. Any idea how to go about this?
In the Google Cloud console, from the service project, go to the Connectivity Tests page. Select Create Connectivity Test. Enter a name for the test.
Pricing. All use of the Drive API is available at no additional cost.
The Google Drive API allows you to create apps that leverage Google Drive cloud storage. You can develop applications that integrate with Drive, and create robust functionality in your application using the Drive API.
The list of available unit test does not list GCS. You can file a feature request on their GitHub to add that functionality.
In the mean time using the setUp for your tests to create files is probably your best bet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With