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

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

""" 

@file 

@brief Mock class @see cl TransferFTP 

""" 

from ftplib import FTP 

from ..loghelper.flog import noLOG 

from .ftp_transfer import TransferFTP 

 

 

class MockTransferFTP (TransferFTP): 

 

""" 

mock @see cl TransferFTP 

""" 

 

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

""" 

same signature as @see cl TransferFTP 

""" 

self._logins = [] 

self._ftp = FTP(None) 

self.LOG = fLOG 

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

 

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

""" 

does nothing, returns True 

""" 

return True 

 

def close(self): 

""" 

does noting 

""" 

pass