def stor(ftp=None):
if ftp is None:<EOL><INDENT>ftp = connect()<EOL>quit = True<EOL><DEDENT>else:<EOL><INDENT>quit = False<EOL><DEDENT>ftp.voidcmd('<STR_LIT>')<EOL>with contextlib.closing(ftp.transfercmd("<STR_LIT>" + TESTFN)) as conn:<EOL><INDENT>chunk = b'<STR_LIT:x>' * BUFFER_LEN<EOL>total_sent = <NUM_LIT:0><EOL>while True:<EOL><INDENT>sent = conn.send(chunk)<EOL>total_sent += sent<EOL>if total_sent >= FILE_SIZE:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT>ftp.voidresp()<EOL>if quit:<EOL><INDENT>ftp.quit()<EOL><DEDENT>return ftp<EOL>
Same as ftplib's storbinary() but just sends dummy data
    instead of reading it from a real file.