MCPcopy Index your code
hub / github.com/python/cpython / setUp

Method setUp

Lib/test/test_urllib2_localnet.py:288–297  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

286 REALM = "Test"
287
288 def setUp(self):
289 super(BasicAuthTests, self).setUp()
290 # With Basic Authentication
291 def http_server_with_basic_auth_handler(*args, **kwargs):
292 return BasicAuthHandler(*args, **kwargs)
293 self.server = LoopbackHttpServerThread(http_server_with_basic_auth_handler)
294 self.addCleanup(self.stop_server)
295 self.server_url = 'http://127.0.0.1:%s' % self.server.port
296 self.server.start()
297 self.server.ready.wait()
298
299 def stop_server(self):
300 self.server.stop()

Callers

nothing calls this directly

Calls 6

superClass · 0.85
addCleanupMethod · 0.80
setUpMethod · 0.45
startMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected