title: write unit test for web.py application by using pytest
body: <p>I would like to write unit test for web.py application by using pytest. How to invoke the web.py services in pytest. </p>
  
  <p>Code:</p>
  
  <pre><code>import web
  
  urls = (
      '/', 'index'
  )
  
  app = web.application(urls, globals()) 
  
  class index:
      def GET(self):
          return "Hello, world!"
  
  if __name__ == "__main__":    
   app.run()
  </code></pre>
  
  <p>It can be done by using python requests module, when we run the web.py services, it will run <a href="http://localhost:8080/" rel="nofollow noreferrer">http://localhost:8080/</a>. Then import requests module and use get method and in response object, you can verify the result. That's fine.</p>
  
  <p>By using Paste and nose also we can achieve this as per web.py official documentation. <a href="http://webpy.org/docs/0.3/tutorial" rel="nofollow noreferrer">http://webpy.org/docs/0.3/tutorial</a>.</p>
  
  <p>Is there any solution in pytest like option in paste and nose.</p>