asp.net – Mocking HttpContext不起作用

asp.net – Mocking HttpContext不起作用

我试图嘲笑HttpContext,以便我可以单元测试我的控制器的Request.IsAhenhenicated调用.我正在使用 code that I found at Scott Hanselman’s博客来使用rhino.mocks来模拟HttpContext. 所以我有这个单位测试片: PostsController postsController = new PostsCo

python – 单元测试(烧瓶 – 静止)GET API调用时获得500内部服务器错误

python – 单元测试(烧瓶 – 静止)GET API调用时获得500内部服务器错误

我已经从我的烧瓶式API模块中单独测试了所有方法.现在我想通过实际进行API调用来测试get方法.我期待这个测试的错误400.我的资源类class Response(Resource): @marshal_with(response_params_get_responses_on_job) def get(self, filter_name