test_graphql_handler.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:graphene-gae 作者: graphql-python 项目源码 文件源码
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.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号