How to unit test Google Cloud Endpoints

Viewed 6956

I'm needing some help setting up unittests for Google Cloud Endpoints. Using WebTest all requests answer with AppError: Bad response: 404 Not Found. I'm not really sure if endpoints is compatible with WebTest.

This is how the application is generated:

application = endpoints.api_server([TestEndpoint], restricted=False)

Then I use WebTest this way:

client = webtest.TestApp(application)
client.post('/_ah/api/test/v1/test', params)

Testing with curl works fine.

Should I write tests for endpoints different? What is the suggestion from GAE Endpoints team?

6 Answers
Related