Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.

Python 2 is no longer supported by the community. We recommend that you migrate Python 2 apps to Python 3.
Stay organized with collections Save and categorize content based on your preferences.

google.appengine.api.files.testutil module

Summary

Files API.

Deprecated since version 1.8.1: Use Google Cloud Storage Client library instead.

Testing utils for writing tests involving Files API.

Contents

class google.appengine.api.files.testutil.TestFileServiceStubsource

Bases: google.appengine.api.apiproxy_stub.APIProxyStub

A FileServiceStub to be used with tests.

Doesn’t perform any kind of file validation and stores all file content in memory. Can be used to test low-level file calls only, because it doesn’t support all features (like blobstore files).

get_content(filename)source

Get current in-memory file content.

set_content(filename, content)source

Set current in-memory file content.