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. Website Portal Testing (1775)
  2. [Free] SiteDigger : vulnerabilities, errors, configuration issues, proprietary information, and interesting security testing tool (5215)
  3. [Webinar] Are You Ready for DO-178C and Emerging Security-Critical Standards? (1308)
  4. [Video] BEZVision Performance Testing Analytics and Workloads (1553)
  5. Testing iPhone Applications (5596)
  6. [Paid] WAPT : Load and stress testing tool (1746)
  7. Performance Testing Article : Loadtester Incorporated (1247)
  8. interview questions : How to do Web Testing? (2287)
  9. Gi沼쌻 thi沼뇎 Test C沼븂g th척ng tin (Web Potal Testing) (1737)
  10. Web testing (1283)
  11. Security Strategies Alert (950)
  12. Building web application security into your development process (1608)
  13. Security Testing for Web Application (2093)
  14. Performance Test Report Template (3785)
  15. Important Counters for Web Testing (2001)
  16. [Video] seNetsparker - A free web app security testing tool (952)
  17. [Free] Real-time NetFlow Analyzer : Free Performance Tool (2018)
  18. [PodCast] Security Testing (104M) (1020)
  19. Web Security Testing Blog (1334)
  20. Creating a Web security testing policy (1917)