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.

google.appengine.api.files.testutil module


Files API.

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

Testing utils for writing tests involving Files API.


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 current in-memory file content.

set_content(filename, content)source

Set current in-memory file content.