http://code.google.com/p/wsgi-intercept/

Testing a WSGI application normally involves starting a server at a local host and port, then pointing your test code to that address. Instead, this library lets you intercept calls to any specific host/port combination and redirect them into a WSGI application importable by your test program. Thus, you can avoid spawning multiple processes or threads to test your Web app.
How Does It Work?

wsgi_intercept works by replacing httplib.HTTPConnection with a subclass, wsgi_intercept.WSGI_HTTPConnection. This class then redirects specific server/port combinations into a WSGI application by emulating a socket. If no intercept is registered for the host and port requested, those requests are passed on to the standard handler.

The functions add_wsgi_intercept(host, port, app_create_fn, script_name='') and remove_wsgi_intercept(host,port) specify which URLs should be redirect into what applications. Note especially that app_create_fn is a function object returning a WSGI application; script_name becomes SCRIPT_NAME in the WSGI app's environment, if set.
Share
Related Documents
  1. [Ebook] HTML for Dummies (1759)
  2. [Video] BEZVision Performance Testing Analytics and Workloads (1110)
  3. "The Living Creature" - Testing Web Applications (950)
  4. [Paid] WAPT : Load and stress testing tool (1457)
  5. [Webinar] Are You Ready for DO-178C and Emerging Security-Critical Standards? (1008)
  6. [Ebook] Practical Applications for Security Testing (4140)
  7. [Ebook] Exploiting Software How to Break Code (2692)
  8. Website Portal Testing (1448)
  9. [Free] SiteDigger : vulnerabilities, errors, configuration issues, proprietary information, and interesting security testing tool (4282)
  10. DevGrow : Blogs for web designers, Tester and developers (656)
  11. Web Security Testing Blog (985)
  12. Performance Test Report Template (3129)
  13. Important Counters for Web Testing (1578)
  14. Automated Functional Testing of Web Search Engines (1441)
  15. Security Testing for Web Application (1840)
  16. Building web application security into your development process (1372)
  17. Creating a Web security testing policy (1639)
  18. [Free] Real-time NetFlow Analyzer : Free Performance Tool (1683)
  19. [Video] seNetsparker - A free web app security testing tool (682)
  20. Testing iPhone Applications (4387)