|
| mox |
|
| config_manager |
|
| mock_dispatcher |
|
| server |
|
| response_status |
|
| response_headers |
|
| response_exc_info |
|
| start_response |
|
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.assert_dispatch_to_spi |
( |
|
self, |
|
|
|
request, |
|
|
|
config, |
|
|
|
spi_path, |
|
|
|
expected_spi_body_json = None |
|
) |
| |
Assert that dispatching a request to the SPI works.
Mock out the dispatcher.add_request and handle_spi_response, and use these
to ensure that the correct request is being sent to the back end when
Dispatch is called.
Args:
request: An ApiRequest, the request to dispatch.
config: A dict containing the API configuration.
spi_path: A string containing the relative path to the SPI.
expected_spi_body_json: If not None, this is a JSON object containing
the mock response sent by the back end. If None, this will create an
empty response.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.check_cors |
( |
|
self, |
|
|
|
request_headers, |
|
|
|
expect_response, |
|
|
|
expected_origin = None , |
|
|
|
expected_allow_headers = None , |
|
|
|
server_response = None |
|
) |
| |
Check that CORS headers are handled correctly.
Args:
request_headers: A list of (header, value), to be used as headers in the
request.
expect_response: A boolean, whether or not CORS headers are expected in
the response.
expected_origin: A string or None. If this is a string, this is the value
that's expected in the response's allow origin header. This can be
None if expect_response is False.
expected_allow_headers: A string or None. If this is a string, this is
the value that's expected in the response's allow headers header. If
this is None, then the response shouldn't have any allow headers
headers.
server_response: A dispatcher.ResponseTuple or None. The backend's
response, to be wrapped and returned as the server's response. If
this is None, a generic response will be generated.
Returns:
A string containing the body of the response that would be sent.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.setUp |
( |
|
self | ) |
|
Set up a dev Endpoints server.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_check_empty_response |
( |
|
self | ) |
|
Test that check_empty_response returns 204 for an empty response.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_check_non_empty_response |
( |
|
self | ) |
|
Test that check_empty_response returns None for a non-empty response.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_dispatch_rpc_error |
( |
|
self | ) |
|
Test than an RPC call that returns an error is handled properly.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_dispatch_spi_error |
( |
|
self | ) |
|
Check the error response if the SPI returns an error.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_handle_cors |
( |
|
self | ) |
|
Test CORS support on a regular request.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_handle_cors_preflight |
( |
|
self | ) |
|
Test a CORS preflight request.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_handle_cors_preflight_invalid |
( |
|
self | ) |
|
Test a CORS preflight request for an unaccepted OPTIONS request.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_handle_cors_preflight_request_headers |
( |
|
self | ) |
|
Test a CORS preflight request.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_handle_non_json_spi_response_cors |
( |
|
self | ) |
|
Test that an error response still handles CORS headers.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_handle_spi_response_batch_json_rpc |
( |
|
self | ) |
|
Verify that batch requests have an appropriate batch response.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_handle_spi_response_json_rpc |
( |
|
self | ) |
|
Verify headers transformed, JsonRpc response transformed, written.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_lily_uses_python_method_name |
( |
|
self | ) |
|
Verify Lily protocol correctly uses python method name.
This test verifies the fix to http://b/7189819
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_transform_json_rpc_response_batch |
( |
|
self | ) |
|
Verify request_id inserted into the body, and body into body.result.
def google.appengine.tools.devappserver2.endpoints.endpoints_server_test.DevAppserverEndpointsServerTest.test_transform_rest_response |
( |
|
self | ) |
|
Verify the response is reformatted correctly.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/tools/devappserver2/endpoints/endpoints_server_test.py