<s> import sys , os . path <EOL> import wsgi_intercept <EOL> from wsgi_intercept import WSGI_HTTPConnection <EOL> from wsgi_intercept import test_wsgi_app <EOL> from httplib import HTTP <EOL> class WSGI_HTTP ( HTTP ) : <EOL> _connection_class = WSGI_HTTPConnection <EOL> from wsgi_intercept . webunit_intercept import WebTestCase <EOL> import unittest <EOL> class WSGI_WebTestCase ( WebTestCase ) : <EOL> scheme_handlers = dict ( http = WSGI_HTTP ) <EOL> def setUp ( self ) : <EOL> wsgi_intercept . add_wsgi_intercept ( '<STR_LIT>' , <NUM_LIT> , <EOL> test_wsgi_app . create_fn ) <EOL> def tearDown ( self ) : <EOL> wsgi_intercept . remove_wsgi_intercept ( ) <EOL> def test_get ( self ) : <EOL> r = self . page ( '<STR_LIT>' ) <EOL> assert test_wsgi_app . success ( ) <EOL> class WSGI_HTTPS_WebTestCase ( WebTestCase ) : <EOL> scheme_handlers = dict ( https = WSGI_HTTP ) <EOL> def setUp ( self ) : <EOL> wsgi_intercept . add_wsgi_intercept ( '<STR_LIT>' , <NUM_LIT> , <EOL> test_wsgi_app . create_fn ) <EOL> def tearDown ( self ) : <EOL> wsgi_intercept . remove_wsgi_intercept ( ) <EOL> def test_get ( self ) : <EOL> r = self . page ( '<STR_LIT>' ) <EOL> assert test_wsgi_app . success ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
