def test_noSchema_returns500(self):
graphql_application = webapp2.WSGIApplication([
('/graphql', GraphQLHandler)
])
app = webtest.TestApp(graphql_application)
for method in (app.get, app.post):
response = method('/graphql', expect_errors=True)
self.assertEqual(response.status_int, 500)
self.assertEqual(response.json_body['errors'][0]['message'], 'GraphQL Schema is missing.')
test_graphql_handler.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录