Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2@file 

3@brief Mock class @see cl TransferFTP 

4""" 

5from ftplib import FTP 

6from ..loghelper.flog import noLOG 

7from .ftp_transfer import TransferFTP 

8 

9 

10class MockTransferFTP (TransferFTP): 

11 

12 """ 

13 mock @see cl TransferFTP 

14 """ 

15 

16 def __init__(self, site, login, password, fLOG=noLOG, ftps='FTP'): # pylint: disable=W0231 

17 """ 

18 same signature as @see cl TransferFTP 

19 """ 

20 self._logins = [] 

21 self._ftp = FTP(None) 

22 self.LOG = fLOG 

23 self._atts = dict(site=site, login=login, password=password) 

24 self.ftps = ftps 

25 

26 def transfer(self, file, to, name, debug=False, blocksize=None, callback=None): 

27 """ 

28 does nothing, returns True 

29 """ 

30 return True 

31 

32 def close(self): 

33 """ 

34 does noting 

35 """ 

36 pass