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.ext.testbed.apiserver_util module

Summary

Utility class for testbed only used for py_test.

This file wraps imports and attributes that testbed would need for accessing api_server and datastore_emulator. testbed uses cloud datastore emulator if and only if emulator_util can be import by it.

Contents

google.appengine.ext.testbed.apiserver_util.get_port(line)source

Get port number out of a line like “some message: localhost:[port].

google.appengine.ext.testbed.apiserver_util.read_lines_until(in_file, stop_string, timeout=30)source

Read lines in an input file until stop_string is found.

google.appengine.ext.testbed.apiserver_util.setup_api_server()source

Launches api_server.

Returns

Two integers, first is the port number for api_server’s http endpoint, second is the port number of the Cloud Datastore Emulator.