View source on GitHub |
A static class. Checks whether datastore emulator is supported.
Inherits From: expected_type
Methods
check
@classmethod
check()
Checks whether cloud datastore should be used.
In a unit test process, the first call to this method sets the value of
_use_datastore_emulator
and _api_port
. Subsequent calls to this method
can read _use_datastore_emulator
.
Returns | |
---|---|
A boolean that indicates whether cloud datastore should be used. |
get_api_port
@classmethod
get_api_port()
Returns the integer port number that api_server listens on.
get_emulator_port
@classmethod
get_emulator_port()
Returns the integer port number that datastore emulator listens on.
init
@classmethod
init( api_port, emulator_port )