예제 #1
0
    def setUp(self):
        # Install the intercept
        from wsgi_intercept import httplib_intercept

        httplib_intercept.install()
        # Add the intercept for a nonexistant domain
        self.domain = "some_hopefully_nonexistant_domain"
        wsgi_intercept.add_intercept(self.domain, self.port, testing.create_fn)
        self.addCleanup(wsgi_intercept.remove_intercept, self.domain, self.port)
        # Cleanup with an intercept uninstall
        self.addCleanup(httplib_intercept.uninstall)
예제 #2
0
 def setUp(self):
     # Install the intercept
     from wsgi_intercept import httplib_intercept
     httplib_intercept.install()
     # Add the intercept for a nonexistant domain
     self.domain = 'some_hopefully_nonexistant_domain'
     wsgi_intercept.add_intercept(self.domain, self.port, testing.create_fn)
     self.addCleanup(wsgi_intercept.remove_intercept, self.domain,
                     self.port)
     # Cleanup with an intercept uninstall
     self.addCleanup(httplib_intercept.uninstall)
예제 #3
0
 def setUp(self):
     import wsgi_intercept
     wsgi_intercept.add_intercept(self.domain, self.port,
                                       self.wsgi_app)
     self.addCleanup(wsgi_intercept.remove_intercept,
                     self.domain, self.port)