{"action":"created","issue":{"url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/423","labels_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/423/comments","events_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/423/events","html_url":"https://github.com/KeepSafe/aiohttp/issues/423","id":91024813,"number":423,"title":"User application testing facility","user":{"login":"saaj","id":5774272,"avatar_url":"https://avatars.githubusercontent.com/u/5774272?v=3","gravatar_id":"","url":"https://api.github.com/users/saaj","html_url":"https://github.com/saaj","followers_url":"https://api.github.com/users/saaj/followers","following_url":"https://api.github.com/users/saaj/following{/other_user}","gists_url":"https://api.github.com/users/saaj/gists{/gist_id}","starred_url":"https://api.github.com/users/saaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saaj/subscriptions","organizations_url":"https://api.github.com/users/saaj/orgs","repos_url":"https://api.github.com/users/saaj/repos","events_url":"https://api.github.com/users/saaj/events{/privacy}","received_events_url":"https://api.github.com/users/saaj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-06-25T17:22:33Z","updated_at":"2016-01-19T20:50:25Z","closed_at":null,"body":"Does `aiohttp` provide functionality to test application written with its HTTP client? It is in the sense of packages like [httpretty](https://pypi.python.org/pypi/httpretty/), [responses](https://pypi.python.org/pypi/responses) and this [SO question](http://stackoverflow.com/q/9559963/2072035). Basically it may be some mock connector to say *here's the next response your should return on any request*. Or it may be more elaborate with separate queues for HTTP methods, base URLs, et cetera. It's useful for integration and system testing. Workarounds are possible, but require to construct complete server to imitate the target and to patch the application's URLs, which can take some substantial effort.\r\n\r\nEven though it's not in my direct interest, the same thing may also apply to HTTP server. Some sort of base test case class that provides means to start user's app, do requests and make assertions about them with ease. Here is [how CherryPy does it](https://cherrypy.readthedocs.org/en/latest/advanced.html#testing-your-application).\r\n\r\nI've looked at the test suite and `aiohttp.test_utils` but there seems to be nothing what I'm looking for exactly. If I have not overlooked it and there's no such functionality at the moment, this can be treated as a feature request."},"comment":{"url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/comments/172982456","html_url":"https://github.com/KeepSafe/aiohttp/issues/423#issuecomment-172982456","issue_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/423","id":172982456,"user":{"login":"asvetlov","id":356399,"avatar_url":"https://avatars.githubusercontent.com/u/356399?v=3","gravatar_id":"","url":"https://api.github.com/users/asvetlov","html_url":"https://github.com/asvetlov","followers_url":"https://api.github.com/users/asvetlov/followers","following_url":"https://api.github.com/users/asvetlov/following{/other_user}","gists_url":"https://api.github.com/users/asvetlov/gists{/gist_id}","starred_url":"https://api.github.com/users/asvetlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asvetlov/subscriptions","organizations_url":"https://api.github.com/users/asvetlov/orgs","repos_url":"https://api.github.com/users/asvetlov/repos","events_url":"https://api.github.com/users/asvetlov/events{/privacy}","received_events_url":"https://api.github.com/users/asvetlov/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T20:50:25Z","updated_at":"2016-01-19T20:50:25Z","body":"@dgelvin but you really don't need a thread at all -- please take a look on https://github.com/KeepSafe/aiohttp/blob/master/tests/test_urldispatch.py tests"}}