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

Class NullFTPHandler

Lib/test/test_urllib2.py:748–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746 pass
747
748 class NullFTPHandler(urllib.request.FTPHandler):
749 def __init__(self, data):
750 self.data = data
751
752 def connect_ftp(self, user, passwd, host, port, dirs,
753 timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
754 self.user, self.passwd = user, passwd
755 self.host, self.port = host, port
756 self.dirs = dirs
757 self.ftpwrapper = MockFTPWrapper(self.data)
758 return self.ftpwrapper
759
760 data = "rheum rhaponicum"
761 h = NullFTPHandler(data)

Callers 1

test_ftpMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_ftpMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…