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

Method test_makepasv

Lib/test/test_ftplib.py:723–728  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

721 'port')
722
723 def test_makepasv(self):
724 host, port = self.client.makepasv()
725 conn = socket.create_connection((host, port), timeout=TIMEOUT)
726 conn.close()
727 # IPv4 is in use, just make sure send_epsv has not been used
728 self.assertEqual(self.server.handler_instance.last_received_cmd, 'pasv')
729
730 def test_makepasv_issue43285_security_disabled(self):
731 """Test the opt-in to the old vulnerable behavior."""

Callers

nothing calls this directly

Calls 4

makepasvMethod · 0.80
create_connectionMethod · 0.45
closeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected