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.
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 2023-04-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-04 UTC."],[[["This module provides testing utilities for the Files API in Google App Engine."],["The Files API has been deprecated since version 1.8.1, with the recommendation to use the Google Cloud Storage Client library."],["The `TestFileServiceStub` class, extending `APIProxyStub`, is designed for testing file-related operations."],["`TestFileServiceStub` does not validate files and stores content in memory, suitable for low-level testing but not for all features like blobstore files."],["`TestFileServiceStub` allows setting and retrieving in-memory file content through `set_content` and `get_content` methods, respectively."]]],[]]