MCPcopy Index your code
hub / github.com/RustPython/RustPython / NullFTPHandler

Class NullFTPHandler

Lib/test/test_urllib2.py:731–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729 pass
730
731 class NullFTPHandler(urllib.request.FTPHandler):
732 def __init__(self, data):
733 self.data = data
734
735 def connect_ftp(self, user, passwd, host, port, dirs,
736 timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
737 self.user, self.passwd = user, passwd
738 self.host, self.port = host, port
739 self.dirs = dirs
740 self.ftpwrapper = MockFTPWrapper(self.data)
741 return self.ftpwrapper
742
743 data = "rheum rhaponicum"
744 h = NullFTPHandler(data)

Callers 1

test_ftpMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_ftpMethod · 0.68