Python 2.7 has reached end of support and will be deprecated on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7 applications, even if your organization previously used an organization policy to re-enable deployments of legacy runtimes. Your existing Python 2.7 applications will continue to run and receive traffic after their deprecation date. We recommend that you migrate to the latest supported version of Python.

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年06月16日 UTC.